-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
π Search Terms
Destructuring
π Version & Regression Information
This changed in #56753
β― Playground Link
π» Code
function foo() { return a }
const [a, b = a + 1] = [42]; // Error disappears when foo is commented out
const [x1, y1 = x1] = [123]; // No error
const [x2, y2 = x2, z2 = y2] = [123]; // Unexpected error hereπ Actual behavior
Unexpected errors.
π Expected behavior
No errors.
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue