Commit 07198ac
Fix spurious "used before being assigned" errors in for of/in loops
Port of microsoft/TypeScript#61376. Adds check for isForInOrOfStatement
to prevent false positive TS2454 errors for variables declared in
for-in/for-of loops when referenced in closures within the loop body.
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>1 parent 681501e commit 07198ac
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10806 | 10806 | | |
10807 | 10807 | | |
10808 | 10808 | | |
10809 | | - | |
10810 | | - | |
10811 | | - | |
| 10809 | + | |
| 10810 | + | |
| 10811 | + | |
10812 | 10812 | | |
10813 | 10813 | | |
10814 | 10814 | | |
| |||
0 commit comments