Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typing interface (index.d.ts) in types folder #85

Open
WuglyakBolgoink opened this issue Nov 18, 2019 · 0 comments
Open

Add typing interface (index.d.ts) in types folder #85

WuglyakBolgoink opened this issue Nov 18, 2019 · 0 comments

Comments

@WuglyakBolgoink
Copy link
Contributor

it will be great to have this interface in project too. (like https://github.com/apache/cordova-plugin-device)

// Type definitions for cordova-plugin-touch-id
// Project: https://github.com/EddyVerbruggen/cordova-plugin-touch-id
//
// Licensed under the MIT license.

declare enum TouchIDResult {
    TOUCH = 'touch',
    FACE = 'face'
}

/**
 * Scan the fingerprint of your user with the TouchID sensor (iPhone 5S).
 * - Compatible with Cordova Plugman.
 * - Minimum iOS version is 8 (error callbacks will be gracefully invoked on lower versions).
 * - Requires a fingerprint scanner, so an iPhone 5S or newer is required.
 */
interface TouchID {
    isAvailable(successCallback: () => TouchIDResult, errorCallback: () => any): void;

    didFingerprintDatabaseChange(successCallback: () => any, errorCallback: () => any): void;

    verifyFingerprint(message: string, successCallback: () => any, errorCallback: () => any): void;

    verifyFingerprintWithCustomPasswordFallback(message: string, successCallback: () => any, errorCallback: () => any): void;

    verifyFingerprintWithCustomPasswordFallbackAndEnterPasswordLabel(message: string, enterPasswordLabel: string, successCallback: () => any, errorCallback: () => any): void;
}

interface Window {
    plugins: {
        touchid: TouchID
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant