DefinitelyTyped/types/react-native-touch-id/react-native-touch-id-tests.ts
2018-02-28 15:03:58 +04:00

11 lines
400 B
TypeScript

import { isSupported, authenticate, TouchIDError } from 'react-native-touch-id';
isSupported().then((isOk: boolean) => {}).catch((error: TouchIDError) => {});
authenticate('reason').then((isOk: boolean) => {}).catch((error: TouchIDError) => {});
authenticate('reason', {
title: 'Authentication Required',
color: '#1306ff'
}).then((isOk: boolean) => {}).catch((error: TouchIDError) => {});