Created
April 9, 2018 21:49
-
-
Save Schniz/3ccdb9164556610c73fa509bcf81f644 to your computer and use it in GitHub Desktop.
opaque types for bcrypt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opaque type bcrypt$hashed = string; | |
declare module "bcrypt" { | |
declare module.exports: { | |
hash: (password: string, saltRounds: number) => Promise<bcrypt$hashed>, | |
compare: ( | |
password: string, | |
hashedPassword: bcrypt$hashed | |
) => Promise<boolean>, | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment