From a2bba58e82e5b14117598536f8fea715434a144f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=C3=BA?= Date: Sun, 8 Nov 2015 10:26:58 +0700 Subject: [PATCH] Create credential.d.ts --- credential/credential.d.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 credential/credential.d.ts diff --git a/credential/credential.d.ts b/credential/credential.d.ts new file mode 100644 index 000000000..d8497ec14 --- /dev/null +++ b/credential/credential.d.ts @@ -0,0 +1,18 @@ +// Type definitions for credential +// Project: https://github.com/ericelliott/credential +// Definitions by: PhĂș +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +declare module 'credential' { + + type HashCallback = (err: Error, hash: string) => void; + type VerifyCallback = (err: Error, isValid: boolean) => void; + + module credential { + function hash(password: string, callback: HashCallback): void; + function verify(hash: string, password: string, callback: VerifyCallback): void; + } + + export = credential; + +}