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:
Ben Clarke
2025-11-13 14:38:15 -05:00
committed by GitHub
parent 3019063ae1
commit b4348cee92
2 changed files with 10 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
---
"nfc": "patch"
"nfc-js": "patch"
---
Update return value of `isAvailable` to match TypeScript function signature
+4 -1
View File
@@ -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
}