-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.
Milestone
Description
π Search Terms
"using of"
π Version & Regression Information
- This changed between versions 5.1 and 5.2_
β― Playground Link
π» Code
{
for (await using of of of);
}
π 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.js
MartinJohns
Metadata
Metadata
Assignees
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.