Skip to content

Commit

Permalink
[Fix] Change type of unused req param to unknown to resolve type conf…
Browse files Browse the repository at this point in the history
…licts (#394)
  • Loading branch information
evansims authored Jun 25, 2024
2 parents e056e51 + cb0d808 commit b83da97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ declare namespace JwksRsa {

/** Types from express-jwt@<=6 */
type secretType = string|Buffer;
type SecretCallbackLong = (req: Express.Request, header: any, payload: any, done: (err: any, secret?: secretType) => void) => void;
type SecretCallback = (req: Express.Request, payload: any, done: (err: any, secret?: secretType) => void) => void;
type SecretCallbackLong = (req: unknown, header: any, payload: any, done: (err: any, secret?: secretType) => void) => void;
type SecretCallback = (req: unknown, payload: any, done: (err: any, secret?: secretType) => void) => void;

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

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

Expand Down

0 comments on commit b83da97

Please sign in to comment.