fix(core): fix incorrect isTauri return type (#9618)

This commit is contained in:
Zihan Hu
2024-05-01 00:03:49 +08:00
committed by GitHub
parent 1bb87a3a22
commit aa080696e0
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@tauri-apps/api": "patch:bug"
---
Fix `isTauri` incorrect return type.

View File

@@ -238,8 +238,8 @@ export class Resource {
}
}
function isTauri() {
return 'isTauri' in window && window.isTauri
function isTauri(): boolean {
return 'isTauri' in window && !!window.isTauri
}
export type { InvokeArgs, InvokeOptions }