Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infer response schema #150

Open
davemaier opened this issue Sep 26, 2024 · 1 comment
Open

Infer response schema #150

davemaier opened this issue Sep 26, 2024 · 1 comment

Comments

@davemaier
Copy link

Hi!

I've just started using this library and I'm a bit confused about the response type. Is it correct that I need to add a response type schema to each hook manually?

Would it generally be possible to infer the response schema from the type information in the elysia object like it's done in eden treaty or am I missing some conceptual differences here?

This would be super useful.

@nxht
Copy link
Contributor

nxht commented Oct 1, 2024

If you're meaning the typebox schema, yes it's necessary as Typescript's type information is not available at the runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants