-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Checking !== undefined
should suffice for an optional argument
#21
Labels
Comments
Known issue, will fix. |
@avikchaudhuri fixed this awhile back when he revamped optional types in v0.2.0. Sorry for forgetting to close out the issue! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code doesn't type-check:
Changing the conditional to
x != null
makes the code work, but I believe checking against undefined should suffice because the argument type itself isn't nullable. Also:!= undefined
doesn't work even though it has the same meaning as!= null
.The text was updated successfully, but these errors were encountered: