mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-21 11:26:15 +02:00
fix(nfc): Resolve boolean in isAvailable to agree with TypeScript API (#3101)
Co-authored-by: Fabian-Lars <github@fabianlars.de>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"nfc": "patch"
|
||||
"nfc-js": "patch"
|
||||
---
|
||||
|
||||
Update return value of `isAvailable` to match TypeScript function signature
|
||||
@@ -269,5 +269,8 @@ export async function write(
|
||||
}
|
||||
|
||||
export async function isAvailable(): Promise<boolean> {
|
||||
return await invoke('plugin:nfc|is_available')
|
||||
const { available }: { available: boolean } = await invoke(
|
||||
'plugin:nfc|is_available'
|
||||
)
|
||||
return available
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user