Import t types for route handler response from absolute paths e.g. src/types/articleResponse instead of ./types/articleResponse
Making use of baseUrl: '.' in tsconfig.json
Same issue occurs with "@src/*": ["./src/*"], path re-write.
What is the expected behavior?
Eden Treaty should pick up the response type of the route
What do you see instead?
Type becomes TreatyResponse<{ 200: any[]; }> | undefined or sometimes TreatyResponse<any> | undefined
Additional information
This was an odd one. If anyone gets confused why their types stopped working for eden treat v2 at least while splitting things out into separate files, then change your imports to be relative (including if the file with the t type definitions imports other types).
What version of Elysia.JS is running?
No response
What platform is your computer?
No response
What steps can reproduce the bug?
Import
t
types for route handlerresponse
from absolute paths e.g.src/types/articleResponse
instead of./types/articleResponse
Making use of
baseUrl: '.'
intsconfig.json
Same issue occurs with
"@src/*": ["./src/*"],
path re-write.What is the expected behavior?
Eden Treaty should pick up the response type of the route
What do you see instead?
Type becomes
TreatyResponse<{ 200: any[]; }> | undefined
or sometimesTreatyResponse<any> | undefined
Additional information
This was an odd one. If anyone gets confused why their types stopped working for eden treat v2 at least while splitting things out into separate files, then change your imports to be relative (including if the file with the
t
type definitions imports other types).