Skip to content

Commit 4728ac7

Browse files
salomaoluizfkotsian
authored andcommitted
Fixed types of onAttempt and isSensorAvailable (#103)
* fix types of onAttempt and isSensorAvailable * fix the description of isSensorAvailable
1 parent 59dfa3e commit 4728ac7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export type AuthenticateIOS = {
22
description: string;
33
fallbackEnabled: boolean;
44
};
5-
export type AuthenticateAndroid = { onAttempt: () => void };
5+
export type AuthenticateAndroid = { onAttempt: (error: FingerprintScannerError) => void };
66

77
export type Biometrics = 'Touch ID' | 'Face ID' | 'Fingerprint';
88

@@ -71,7 +71,7 @@ export interface FingerPrintProps {
7171
/**
7272
### isSensorAvailable(): (Android, iOS)
7373
Checks if Fingerprint Scanner is able to be used by now.
74-
- Returns a `Promise<string>`
74+
- Returns a `Promise<Biometrics>`
7575
- `biometryType`: *String* - The type of biometric authentication supported by the device.
7676
- `error: FingerprintScannerError { name, message, biometric }` - The name and message of failure and the biometric type in use.
7777
@@ -87,7 +87,7 @@ export interface FingerPrintProps {
8787
8888
------------
8989
*/
90-
isSensorAvailable: () => Promise<string>;
90+
isSensorAvailable: () => Promise<Biometrics>;
9191

9292
/**
9393
### authenticate({ description, fallbackEnabled }): (iOS)

0 commit comments

Comments
 (0)