Skip to content

Commit f4bedd4

Browse files
committed
Fix GetVerificationKey typing to include undefined
1 parent 137cef3 commit f4bedd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ declare namespace JwksRsa {
7171
type SecretCallback = (req: Express.Request, payload: any, done: (err: any, secret?: secretType) => void) => void;
7272

7373
/** Types from express-jwt@>=7 */
74-
type GetVerificationKey = (req: Express.Request, token: Jwt | undefined) => Secret | Promise<Secret>;
74+
type GetVerificationKey = (req: Express.Request, token: Jwt | undefined) => Secret | undefined | Promise<Secret | undefined>;
7575

7676
function expressJwtSecret(options: ExpressJwtOptions): SecretCallbackLong|GetVerificationKey;
7777

0 commit comments

Comments
 (0)