-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Void method in if clause #10942
Labels
Duplicate
An existing issue was already created
Comments
We currently consider anything to be coercable to truthy/falsy. Might be dangerous in this case. Really seems like your callback parameter should not be optional there, though. |
RyanCavanaugh
added
Suggestion
An idea for TypeScript
In Discussion
Not yet reached consensus
labels
Sep 15, 2016
Thank you @RyanCavanaugh for your answer, well... that is an abstraction of the |
Thanks @jeffreymorlan ! |
RyanCavanaugh
added
Duplicate
An existing issue was already created
and removed
In Discussion
Not yet reached consensus
Suggestion
An idea for TypeScript
labels
Sep 16, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
TypeScript Version: 1.8.0
Is it a bug?
Code
Expected behavior:
Raise an error telling a void type is not permitted.
Actual behavior:
No error.
The text was updated successfully, but these errors were encountered: