-
Notifications
You must be signed in to change notification settings - Fork 511
Add new decorator for casting to Boolean #363
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
Remove stable nodejs version support for builds
Boolead -> Boolean Co-authored-by: Vlad <[email protected]>
My opinion about this PR is the same as I wrote in #334. This is out of scope for class-transformer. In JSON we have a well-defined way of using boolean values: If this feature is crucial for someone, this can be easily implemented with a |
Yes, that's why i implemented it as a separated decorator and didn't change default usage. |
You can achieve this currently by enabling implicit conversion. I understand However, adding extra decorators I don't think we will do it encourages an (in my opinion) invalid workflow. class-validator should be able to infer what basic type you wanted to get there and if you need to use decorators them something is not handled correctly. (Again booleans are a somewhat special case, so I am not implying anything negative regarding your approach.) |
Closing in favor of #550. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
No description provided.