diff --git a/credential/credential-tests.ts b/credential/credential-tests.ts
new file mode 100644
index 000000000..6013436b0
--- /dev/null
+++ b/credential/credential-tests.ts
@@ -0,0 +1,16 @@
+///
+
+import * as credential from 'credential';
+
+credential.hash('password', function(err: Error, hash: string) {
+ if (err) console.error(err);
+ else console.log(hash);
+});
+
+const hash = '{}';
+const password = 'test';
+
+credential.verify(hash, password, function(err: Error, isValid: boolean) {
+ if (err) console.error(err);
+ else console.log(isValid ? 'Password match' : 'Incorrect password');
+});
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;
+
+}