Closed itsnoctural closed 1 month ago
1.0.27
Microsoft Windows NT 10.0.22631.0 x64
import { Elysia, t } from "elysia"; new Elysia() .get( "/", ({ error }) => { const hello = false; if (!hello) { return error(400); } return { example: "Hello" }; }, { response: { 200: t.Object({ example: t.String() }), }, }, ) .listen(8080);
No response
Expected 2 arguments, but got 1. ts(2554) context.d.ts(73, 301): An argument for 'response' was not provided.
This is an expected behavior, as 400 response is not defined in response schema, it's not allowed to used unless explicitly defined.
response
What version of Elysia.JS is running?
1.0.27
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
What is the expected behavior?
No response
What do you see instead?
Additional information
No response