Update docs
This commit is contained in:
9
index.d.ts
vendored
9
index.d.ts
vendored
@@ -33,9 +33,9 @@ declare class JWT {
|
||||
* Returns the payload **without** verifying the integrity of the token. Please use `jwt.verify()` first to keep your application secure!
|
||||
*
|
||||
* @param {string} token The token string generated by `jwt.sign()`.
|
||||
* @returns {object | null} Returns payload `object`.
|
||||
* @returns {JWTDecodeReturn} Returns an `object` containing `header` and `payload`.
|
||||
*/
|
||||
decode(token: string): object | null
|
||||
decode(token: string): JWTDecodeReturn
|
||||
}
|
||||
declare const _exports: JWT
|
||||
|
||||
@@ -52,4 +52,9 @@ type JWTVerifyOptions = {
|
||||
throwError?: boolean
|
||||
}
|
||||
|
||||
type JWTDecodeReturn = {
|
||||
header: object,
|
||||
payload: object
|
||||
}
|
||||
|
||||
export = _exports
|
||||
Reference in New Issue
Block a user