From f63ad1804220c715219b918ac8ef936f24434756 Mon Sep 17 00:00:00 2001 From: Derek Schaller Date: Thu, 5 Nov 2020 12:25:01 -0800 Subject: [PATCH] add reserved claims types --- index.d.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 5980eab..078ff11 100644 --- a/index.d.ts +++ b/index.d.ts @@ -4,4 +4,14 @@ export interface JwtDecodeOptions { header?: boolean; } -export default function jwtDecode(token: string, options?: JwtDecodeOptions): unknown; +export interface JwtClaims { + iss?: string; + sub?: string; + aud?: string[] | string; + exp?: number; + nbf?: number; + iat?: number; + jti?: string; +} + +export default function jwtDecode(token: string, options?: JwtDecodeOptions): JwtClaims;