forked from netlify/functions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow returning
Response
objects from function Handlers
Per the [functions documentation][1], it seems like you should be able to return a standard `Response` object from function handlers. However, the existing types only allows a user to return a `HandlerResponse` object. This updates the Handler type to accept both types as a return value. (It looks like netlify#351 also addresses this issue, but that PR is a little stale at this point.) [1]: https://docs.netlify.com/functions/get-started/?fn-language=ts#synchronous-function
- Loading branch information
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters