Skip to content

Rest element in array destructuring assignment should allow an array/object pattern #2156

@JsonFreeman

Description

@JsonFreeman

The following code gives an error, but according to section 12.14.5.3 of the ES6 spec, it should be allowed:

var a, b;
[...[a, b]] = [0, 1];
[...{ 0: a, 1: b }] = [0, 1];

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptES6Relates to the ES6 SpecFixedA PR has been merged for this issue

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions