Allow of in await using declarations in for-of loops#55558
Allow of in await using declarations in for-of loops#55558rbuckton merged 3 commits intomicrosoft:mainfrom
of in await using declarations in for-of loops#55558Conversation
7a75c09 to
7f15218
Compare
| for await (await using of of of) {}; | ||
| ~~~~~ | ||
| !!! error TS1431: 'for await' loops are only allowed at the top level of a file when that file is a module, but this file has no imports or exports. Consider adding an empty 'export {}' to make this file a module. |
There was a problem hiding this comment.
Can we put this in an async context, like an async function so that we don't have this spurious error in errors.txt?
There was a problem hiding this comment.
I just pushed out the requested change. Could you take another look at this?
|
Note that 5.3 is cut; not sure if you intended for this to be in 5.3 or not. |
|
I did. This was a bugfix for a grammar error. |
await using declarations in for-of loopsof in await using declarations in for-of loops
|
It was synced in after I commented, so nevermind! |
|
With this change, Was that an intentional aspect of this change or was that a regression? |
|
@evanw thanks for this information - I'll take a look at this soon. |
fixes #55555