-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
typescript forEach expecting additional conditions #24213
Comments
Please see #10982 (comment) for an explanation. consider using |
But my variable is dynamic based on if condition or may be initializing from constructor. I cannot use const the best what can I do use "readonly" (finalized) . But I will get the same issue. |
Why in my static function I have same issue. I am validating "a" (is not null). Other loops and "return" from a function are not complaining except forEach function.
|
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
I cannot understand why in typescript forEach loop the behavior is different comparing with for, for in, or for of loops???
The text was updated successfully, but these errors were encountered: