-
-
Notifications
You must be signed in to change notification settings - Fork 375
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
Handler return is not type-checked. #1228
Labels
Comments
This seems to be a regression with Middy 5. Middy 4 is able to correctly validate the type:
|
A PR is welcome for this. |
On it 🙏 Will keep you posted. |
jerizm
added a commit
to jerizm/middy
that referenced
this issue
Sep 18, 2024
jerizm
added a commit
to jerizm/middy
that referenced
this issue
Sep 18, 2024
jerizm
added a commit
to jerizm/middy
that referenced
this issue
Sep 18, 2024
jerizm
added a commit
to jerizm/middy
that referenced
this issue
Sep 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using TypeScript, the return of a handler is not being validated by the type checker.
To Reproduce
Add this file
Expected behaviour
The type checker should have throw an error since
123
does not match theAPIGatewayProxyResult
.Note: I know that this can be workaround by manually adding the return type to the handler function, but that's more error prone.
Environment (please complete the following information):
The text was updated successfully, but these errors were encountered: