Skip to content

[@types/express] 4 argument function is not inferred as ErrorRequestHandler in Express.use #60353

Discussion options

You must be logged in to vote

The problem is that the signature using RequestHandler has a higher precedence over the one using RequestHandlerParams. If you swap that two lines it’s going the work. The problem was introduced by #10025.

Edit: Pull request

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wirekang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pkg: express Discussions related to express
3 participants