-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting error while using " return res.json({ }) " #6022
Comments
the problem was in @types/[email protected] , 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? |
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 EDIT: BELOW IRRELEVANT 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. |
Related issue #5987 |
Hey @tanmayvaij hope you find well, so basically something that you can do with that version of @types/[email protected] is changing a little bit your approach instead of using
|
This issue is related to this interface in express-serve-static-core
adding the |
using "express": "^4.21.0",
created this middleware for token verification
i get this err while starting the server
The text was updated successfully, but these errors were encountered: