-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Labels
Milestone
Description
Describe the bug
We allow Response objects to be returned from request handlers, but that's really just because Response objects happen to include compatible status, headers and body properties. But TypeScript offers to help you construct a Response of your own, which isn't particularly helpful:
Reproduction
Create a request handler, add the import('@sveltejs/kit').RequestHandler type, and return something.
Logs
No response
System Info
System:
OS: macOS 12.0.1
CPU: (10) arm64 Apple M1 Max
Memory: 8.65 GB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.13.1 - ~/.nvm/versions/node/v16.13.1/bin/node
npm: 8.1.2 - ~/.nvm/versions/node/v16.13.1/bin/npm
Browsers:
Chrome: 97.0.4692.99
Firefox: 96.0.3
Safari: 15.1
npmPackages:
@sveltejs/vite-plugin-svelte: ^1.0.0-next.32 => 1.0.0-next.32
svelte: ^3.44.2 => 3.44.2
vite: ^2.7.2 => 2.7.2Severity
annoyance
Additional Information
No response
Reactions are currently unavailable
