-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Params type conversion #4
Comments
Very true. Will add this in shortly
…On Thu, Jul 25, 2019, 9:38 PM georgyfarniev ***@***.***> wrote:
If I supply @params('id') id: number, then it should be converted to
number. A good example can be found in type-graphql library.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABMJBVSCMNVNIQ3FJQJPIQDQBJPTNANCNFSM4IG75JLQ>
.
|
Besides strings(default) and numbers(requested), the other primitive is the boolean. For numbers, An item can either be a number or NAN, so that's super easy to confidently cast. For The boolean, however, it is more nuanced and open to interpretation of what a true or a false is depending on expected input. So I'm considering leaving boolean as is. Suggestions @georgyfarniev? |
Fixed in v1.3.6 for number primitives only. Feel free to open up another issue for other primitives with suggestions on how to cast them and we can discuss those there. |
If I supply
@Params('id') id: number
, then it should be converted to number. A good example can be found in type-graphql library.The text was updated successfully, but these errors were encountered: