Parsing error for for (await using of of of) {}
#55555
Labels
Fix Available
A PR has been opened for this issue
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
π Search Terms
"using of"
π Version & Regression Information
β― Playground Link
https://www.typescriptlang.org/play?#code/N4KABGBmD2BOYAoCGB3JBLALmArgZ3QDsBzMaSMi8gSgG5wo4xUNtk0tcCTLeb6AviCA
π» Code
π Actual behavior
Parsing error
The left-hand side of a 'for...of' statement must be a variable or a property access.
π Expected behavior
Parse successful.
Additional information about the issue
Context: https://github.com/prettier/prettier/pull/15321/files#r1308180336
Spec: https://tc39.es/proposal-explicit-resource-management/#sec-for-in-and-for-of-statements
Babel can parse
for (await using of of of) {}
. ref: https://github.com/babel/babel/blob/b804bb08912d262133213dcd7f40d81645f97489/packages/babel-parser/test/fixtures/experimental/async-explicit-resource-management/valid-for-using-binding-of-of/input.jsThe text was updated successfully, but these errors were encountered: