-
-
Notifications
You must be signed in to change notification settings - Fork 387
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What version of Elysia is running?
1.4.16
What platform is your computer?
Darwin 25.1.0 arm64 arm
What environment are you using
bun 1.3.2
Are you using dynamic mode?
no
What steps can reproduce the bug?
- clone this repository
- run
bun install - open the
src/index.tsfile and hover over theAppResponseandAppTwoResponsetypes
What is the expected behavior?
elysia is expected to infer the zod response type even for the 200 status code and ensure it is fully type-safe
so, it would output something like:
type AppResponse = {
200: {
message: "Hello Elysia";
};
422: {
type: "validation";
on: string;
summary?: string;
message?: string;
found?: unknown;
property?: string;
expected?: string;
};
}What do you see instead?
type AppResponse = {
[x: string]: any;
[x: number]: any;
[x: symbol]: any;
}Additional information
this issue is not reproducible in elysia versions 1.4.0 to 1.4.13. in elysia version 1.4.14 and later, it breaks, as i reported here
Have you try removing the node_modules and bun.lockb and try again yet?
yes
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working