-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Is this a regression in control flow-based type analysis for --strictNullChecks
?
#25109
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
Comments
Thanks for the speedy reply @RyanCavanaugh. Since this is the same as #11483, how is it different than the docs on control flow based type analysis? Does that performance hit come from checking if the property access/getter modifies the object? I'd like to propose two actions:
|
The difference is Notice that CFA works perfectly fine when the keys are static, e.g.
|
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
TypeScript Version: 2.9.2
Search Terms: typeof undefined guard property strictnullchecks
Code
With
--strictNullChecks
:Expected behavior:
undefined
instead of astring
.Actual behavior: 😓

Playground Link:
http://www.typescriptlang.org/play/#src=...
Related Issues:
The text was updated successfully, but these errors were encountered: