-
Notifications
You must be signed in to change notification settings - Fork 28
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
Mark as required #41
Comments
How would imagine this plays out? class Thing {
@autoseralizeAs(String, true) thing1 : string;
//or
@autoserializeRequired thing2 : string;
} or something else? I like the idea, I'm unsure off the top of my head what the interface for that would look like |
I prefer
Like java style
|
Because interfaces are compile time only in typescript - i see a lot of 'loose' declarations where data could or could not be missing depending on the source. Having auto runtime checking of all properties would be a huge win |
Yeah I agree. I think I prefer the separate annotation. I'll see what I can do about that, or feel free to submit a PR since it will take me a few days before I have time to look at this seriously |
Happy to test it when its ready! I definitely dont have the bandwidth |
Any news on the proposal? |
No no update yet, haven't had the time unfortunately. feel free to submit a PR though |
It would be great if we could have a decorator that allowed use to mark a paramater as required during serialize/deserialize/auto
This would allow us to ensure that the contract is properly met.
The text was updated successfully, but these errors were encountered: