GoScrobble/web/node_modules/jwt-decode/index.d.ts

26 lines
429 B
TypeScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
export class InvalidTokenError extends Error {}
export interface JwtDecodeOptions {
header?: boolean;
}
export interface JwtHeader {
type?: string;
alg?: string;
}
export interface JwtPayload {
iss?: string;
sub?: string;
aud?: string[] | string;
exp?: number;
nbf?: number;
iat?: number;
jti?: string;
}
export default function jwtDecode<T = unknown>(
token: string,
options?: JwtDecodeOptions
): T;