Added typescript support
This commit is contained in:
7
index.d.ts
vendored
Normal file
7
index.d.ts
vendored
Normal 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
|
||||||
Reference in New Issue
Block a user