Skip to content

Commit b83da97

Browse files
authored
[Fix] Change type of unused req param to unknown to resolve type conflicts (#394)
2 parents e056e51 + cb0d808 commit b83da97

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ declare namespace JwksRsa {
6767

6868
/** Types from express-jwt@<=6 */
6969
type secretType = string|Buffer;
70-
type SecretCallbackLong = (req: Express.Request, header: any, payload: any, done: (err: any, secret?: secretType) => void) => void;
71-
type SecretCallback = (req: Express.Request, payload: any, done: (err: any, secret?: secretType) => void) => void;
70+
type SecretCallbackLong = (req: unknown, header: any, payload: any, done: (err: any, secret?: secretType) => void) => void;
71+
type SecretCallback = (req: unknown, 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 | undefined | Promise<Secret | undefined>;
74+
type GetVerificationKey = (req: unknown, token: Jwt | undefined) => Secret | undefined | Promise<Secret | undefined>;
7575

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

0 commit comments

Comments
 (0)