mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-30 17:48:50 +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:
co-authored by
Fabian-Lars
parent
3019063ae1
commit
b4348cee92
@@ -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> {
|
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