-
-
Notifications
You must be signed in to change notification settings - Fork 443
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
Generic parse function #255
Comments
I have also caught common case in practice. It would be really convenient to use this generic with static type checking. |
On DefinitelyTyped there is a lint rule to guard against this, and I would not recommend adding this as it hides an unsafe cast. There is nothing at all that guarantees that If you want to do this in your code, you can always do It's the same with |
@LinusU could you elaborate on why it would be unsafe? Could you not take the generic passed into the function & wrap a |
So, want to used parse function by generic
And the IDE can suggest the query object's properties.
The text was updated successfully, but these errors were encountered: