-
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
No error on properties access inside a if statement #130
Comments
Duplicate of #106 |
This is still an issue, and doesn't look like a duplicate of #106 to me -- there's no function involved. |
Yeah, this is definitely a different issue. But it’s also a semi deliberate one. Flow allows extra properties on objects inside if tests, which in cases like this can lead to run time exceptions. I would guess this behavior is not going away because I exact object types have some uses and that the flow team would encourage the use of exact object types to prevent this kind of problem if you don’t need that flexibility. |
Originally reported in typescript discussion see: microsoft/TypeScript#1265 (comment)
The text was updated successfully, but these errors were encountered: