mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-13 13:30:28 +00:00
@types/react-native-touch-id: Updated the module to version 4.0.2, adding new config option (#27007)
* Updated the module to version 4.0.2 * Updated Contributor name * Fix header
This commit is contained in:
+5
-3
@@ -1,7 +1,8 @@
|
||||
// Type definitions for react-native-touch-id 4.0.0
|
||||
// Type definitions for react-native-touch-id 4.0.2
|
||||
// Project: https://github.com/naoufal/react-native-touch-id
|
||||
// Definitions by: huhuanming <https://github.com/huhuanming>
|
||||
// Nikolay Polukhin <https://github.com/gazaret>
|
||||
// Jin Shin <https://github.com/jinshin1013>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare module 'react-native-touch-id' {
|
||||
@@ -15,8 +16,9 @@ declare module 'react-native-touch-id' {
|
||||
}
|
||||
|
||||
export interface AuthenticateConfig {
|
||||
title: string;
|
||||
color: string;
|
||||
title?: string;
|
||||
color?: string;
|
||||
fallbackTitle: string;
|
||||
}
|
||||
|
||||
export const isSupported: () => Promise<boolean | string | TouchIDError>;
|
||||
|
||||
@@ -6,5 +6,6 @@ authenticate('reason').then((isOk: boolean) => {}).catch((error: TouchIDError) =
|
||||
|
||||
authenticate('reason', {
|
||||
title: 'Authentication Required',
|
||||
color: '#1306ff'
|
||||
color: '#1306ff',
|
||||
fallbackTitle: 'Fallback Authentication Method'
|
||||
}).then((isOk: boolean) => {}).catch((error: TouchIDError) => {});
|
||||
|
||||
Reference in New Issue
Block a user