-
Notifications
You must be signed in to change notification settings - Fork 49
feat: add automatic types generation #703
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very impressive. Just a few minor tweaks, and questions on nesting...
@marcalexiei and @jacobhq, I consider this feature ready for review. It will definitely need to be extended in the future to support all the possible cases, but as starting point should cover most of the user usages. Let me know what you think about it, and please try it on your local env to see if you find any "awkwardness" that I might have miss. Thanks! |
Checklist
Related issue
Fixes #463
Overview
This feature adds the support for automatically types generation. By just
#[derive(...)]
theType
trait, thestruct
orenum
will be automatically translated to a typescript type and it will be available from the"tuono/types"
moduleHow to QA locally
For the best QA experience, run the command
RUST_LOG=tuono=trace t dev
What features are exposed?
Checkout the new documentation page for all the details tuono-labs/tuono-documentation#89
Does this feature cover all the possible user usages?
No. This feature covers most of the user needs but doesn't implement complex cases. Since it is very hard to know beforehand what are all the users' needs (and implementing variants is quite straightforward) I consider this PR ready enough for starting using it.