-
Notifications
You must be signed in to change notification settings - Fork 116
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
add support for top level type overrides #286
add support for top level type overrides #286
Conversation
I like this! It's a simple change and it's cleanly implemented! |
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.
I have two small nitpicks, otherwise, LGTM
@NyxCode is there anything else you'd like to change? |
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.
Nothing from my side!
Great work @dr-bonez, thanks!
Goal
This adds support for easily defining a struct or enum's type definition manually at the top level using the
type = ".."
attribute. This is useful for when you have a custom serialize/deserialize and don't want to manually implement theTS
trait.Changes
Added
type_override
to the container attributes, and defined an early-returned implementation for if this attribute is specifiedChecklist