From 4bb84f6a198cd8087b90cdb8df5f115c1c3e88bd Mon Sep 17 00:00:00 2001 From: Stoian Ivanov Date: Mon, 2 Jul 2018 20:05:00 +0300 Subject: [PATCH] combine possible error types in single type and use it for verification callback (#26853) --- types/jsonwebtoken/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/jsonwebtoken/index.d.ts b/types/jsonwebtoken/index.d.ts index 23d58789e1..f54d3862c9 100644 --- a/types/jsonwebtoken/index.d.ts +++ b/types/jsonwebtoken/index.d.ts @@ -77,10 +77,10 @@ export interface DecodeOptions { complete?: boolean; json?: boolean; } - +export type VerifyErrors=JsonWebTokenError | NotBeforeError | TokenExpiredError; export interface VerifyCallback { ( - err: JsonWebTokenError | NotBeforeError | TokenExpiredError, + err: VerifyErrors, decoded: object | string, ): void; }