-
Notifications
You must be signed in to change notification settings - Fork 324
Description
Clear and concise description of the problem
Instead of writing decorators for omiting or requiring fields, there should be easier and more native construct in the language to achieve this.
E.g. I want to make all fields Nullable, or conditionally Nullable, or construct variations of models based on subset of fields in my model, so I'm forced to write custom decorator for that, instead of just expressing this in the language.
This would also simplify lot's of specific types utils development and introspection. Some very limited and primitive subset of what TypeScript can do atm with mapped types would suffice, like simple mapping, adding/removing optionality. This makes models parsing also easier in a sense that it eliminates additional decorators from an AST and forces work with more native language constructs.
Checklist
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.