Closed k725 closed 4 months ago
Looking at the source code for the passport integration, it appears that the req
parameter isn't even used. I think that means that it would be safe to type this as unknown
in the type definitions and avoid this issue happening again if Passport integrates the proposed PR to change this type again from Request
to IncomingMessage
.
Edit: see below. I have opened a PR that changes this parameter to unknown
typing to remove the mismatch error for users on both the v3 and v4 typedefs for passport.
@zackdotcomputer Yes, I think the unknown type is better if it is not used. 👍
Checklist
Description
It works on
@types/passport-jwt@3.0.13
, but the build fails on@types/passport-jwt@4.0.0
due to type changes.This is caused by changes in the following parts. https://github.com/DefinitelyTyped/DefinitelyTyped/pull/67897/files#diff-b71c8d6ec401ffed807cc36d147e6eda88a0a5eb1a17175172ce9004026d8b79R38-L41
The following patch can be used as a simple change. https://github.com/auth0/node-jwks-rsa/blob/master/index.d.ts#L68-L74
Reproduction
Additional context
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/67897
jwks-rsa version
v3.1.0
Node.js version
v20.10.0