diff --git a/index.d.ts b/index.d.ts index 5980eab..9059aa1 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,4 +4,22 @@ export interface JwtDecodeOptions { header?: boolean; } -export default function jwtDecode(token: string, options?: JwtDecodeOptions): unknown; +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( + token: string, + options?: JwtDecodeOptions +): T;