removed babel transpiling and fixed typescript definition for IDE introspection
This commit is contained in:
parent
b2aa464b01
commit
be700bbe1f
20
index.d.ts
vendored
20
index.d.ts
vendored
@ -1,45 +1,45 @@
|
||||
declare module 'react-native-biometrics' {
|
||||
export default interface ReactNativeBiometrics {
|
||||
/**
|
||||
* Enum for touch id sensor type
|
||||
*/
|
||||
const TouchID: string;
|
||||
TouchID: string;
|
||||
|
||||
/**
|
||||
* Enum for face id sensor type
|
||||
*/
|
||||
const FaceID: string;
|
||||
FaceID: string;
|
||||
|
||||
/**
|
||||
* Enum for generic biometrics (this is the only value available on android)
|
||||
*/
|
||||
const Biometrics: string;
|
||||
Biometrics: string;
|
||||
|
||||
/**
|
||||
* Returns promise that resolves to an object with object.biometryType = Biometrics | TouchID | FaceID
|
||||
* @returns {Promise<Object>} Promise that resolves to null, TouchID, or FaceID
|
||||
*/
|
||||
function isSensorAvailable(): Promise<Object>;
|
||||
isSensorAvailable(): Promise<Object>;
|
||||
|
||||
/**
|
||||
* Creates a public private key pair,returns promise that resolves to
|
||||
* an object with object.publicKey, which is the public key of the newly generated key pair
|
||||
* @returns {Promise<Object>} Promise that resolves to newly generated public key
|
||||
*/
|
||||
function createKeys(): Promise<Object>;
|
||||
createKeys(): Promise<Object>;
|
||||
|
||||
/**
|
||||
* Returns promise that resolves to an object with object.keysExists = true | false
|
||||
* indicating if the keys were found to exist or not
|
||||
* @returns {Promise<Object>} Promise that resolves to true or false
|
||||
*/
|
||||
function biometricKeysExist(): Promise<Object>;
|
||||
biometricKeysExist(): Promise<Object>;
|
||||
|
||||
/**
|
||||
* Returns promise that resolves to an object with true | false
|
||||
* indicating if the keys were properly deleted
|
||||
* @returns {Promise<Object>} Promise that resolves to true or false
|
||||
*/
|
||||
function deleteKeys(): Promise<Object>;
|
||||
deleteKeys(): Promise<Object>;
|
||||
|
||||
/**
|
||||
* Prompts user with biometrics dialog using the passed in prompt message and
|
||||
@ -51,7 +51,7 @@ declare module 'react-native-biometrics' {
|
||||
* @param {string} createSignatureOptions.cancelButtonText (Android only)
|
||||
* @returns {Promise<Object>} Promise that resolves to cryptographic signature
|
||||
*/
|
||||
function createSignature(createSignatureOptions: Object): Promise<Object>;
|
||||
createSignature(createSignatureOptions: Object): Promise<Object>;
|
||||
|
||||
/**
|
||||
* Prompts user with biometrics dialog using the passed in prompt message and
|
||||
@ -63,5 +63,5 @@ declare module 'react-native-biometrics' {
|
||||
* @returns {Promise<Object>} Promise that resolves to true if the user passes, resolves to false
|
||||
* if the user cancels, and rejects if anything fails
|
||||
*/
|
||||
function simplePrompt(simplePromptOptions: Object): Promise<Object>;
|
||||
simplePrompt(simplePromptOptions: Object): Promise<Object>;
|
||||
}
|
||||
|
||||
3124
package-lock.json
generated
3124
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -3,12 +3,11 @@
|
||||
"version": "2.0.0",
|
||||
"summary": "A React Native library for biometrics",
|
||||
"description": "React Native biometric functionality for signing and encryption",
|
||||
"main": "lib/index.js",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"scripts": {
|
||||
"clean": "rm -rf lib && rm -rf node_modules && npm install",
|
||||
"build": "babel index.js -d lib",
|
||||
"release": "npm run clean && npm run build && npm publish"
|
||||
"release": "npm run clean && npm publish"
|
||||
},
|
||||
"keywords": [
|
||||
"react-native",
|
||||
@ -39,9 +38,5 @@
|
||||
"bugs": {
|
||||
"url": "https://github.com/SelfLender/react-native-biometrics/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.5.5",
|
||||
"@babel/core": "^7.5.5",
|
||||
"metro-react-native-babel-preset": "^0.56.0"
|
||||
}
|
||||
"devDependencies": {}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user