Open tanmayvaij opened 1 week ago
the problem was in @types/express@5.0.0 , when i used previous version the issue was solved
EDIT: THIS COMMENT IRRELEVANT
Looking to lend a hand, what help do you want here? More info on the bug, updated types for 5.0, overload that allows res return? Have only read this issue will dig in some tomorrow
Q1: is it express intention to not call next and return out of a middleware? Doco is only representative of calling next(), to handle errors out of them it's handed to custom error handler https://expressjs.com/en/guide/writing-middleware.html
EDIT: BELOW IRRELEVANT Q2: Should app.{verb} take middle ware before final handler, or are these verb fns meant to be single handler end points?
Note1: I have looked at the types that are throwing in types/express-serve-static-core, they seem to have no changes since v4. This was a quick look.
Will get to more work over the weekend
It seems that types for 5 are working as intended because next is the intention of middleware instead of returning directly out of them. This is pending answers from library authors as I don't know the intentions for 5
Related issue #5987
using "express": "^4.21.0", created this middleware for token verification
i get this err while starting the server