-
Notifications
You must be signed in to change notification settings - Fork 12.8k
null checks are ignored in "unknown" narrowing #37658
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
Labels
Duplicate
An existing issue was already created
Comments
@nmain is correct. We don't have any mechanism to produce a useful narrowing for |
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
It hasn’t been addressed if this has been fixed by #37134 or not. Should this still be closed? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TypeScript Version: 3.8.3 Nightly playground
Search Terms:
Code
Expected behavior:
2 and 4 shouldn't have
null
as expected type.Actual behavior:
null
checks are being ignored depending on the order they're in.The text was updated successfully, but these errors were encountered: