1
0

Added typescript support

This commit is contained in:
2021-05-01 16:21:47 +02:00
parent 6e0ce1cf82
commit bf90a7c855

7
index.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
declare class JWT {
sign(payload: object, secret: string, algorithm?: "HS256" | "HS512"): Promise<string>
verify(token: string, secret: string, algorithm?: "HS256" | "HS512"): Promise<boolean>
decode(token: string): object | null
}
declare const _exports: JWT
export = _exports