From 9ff681ab29c5483cb95c94b5c475f1aa3d148dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20F=2E=20Romaniello?= Date: Wed, 19 Jun 2024 11:13:27 -0300 Subject: [PATCH] fix: express-jwt types This is the correct type given that the returned callback can handle both type of arguments. --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 652f98b8..6c97d665 100644 --- a/index.d.ts +++ b/index.d.ts @@ -73,7 +73,7 @@ declare namespace JwksRsa { /** Types from express-jwt@>=7 */ type GetVerificationKey = (req: Express.Request, token: Jwt | undefined) => Secret | undefined | Promise; - function expressJwtSecret(options: ExpressJwtOptions): SecretCallbackLong|GetVerificationKey; + function expressJwtSecret(options: ExpressJwtOptions): SecretCallbackLong & GetVerificationKey; function passportJwtSecret(options: ExpressJwtOptions): SecretCallback;