{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "ArrayPattern", "elements": [ { "type": "RestElement", "argument": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 9 }, "end": { "line": 17, "column": 10 } } }, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 10 } } } ], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 11 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 16 } } }, { "type": "StringLiteral", "value": "foo", "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 23 } } }, { "type": "BooleanLiteral", "value": true, "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 29 } } } ], "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 30 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 30 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 31 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 2 } } }, "right": { "type": "ObjectExpression", "properties": [], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 7 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 7 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 8 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 18, "column": 8 } } } TypeError: Type '{ }' is not assignable to type '[number, string, boolean]'. [arrayDestructuring11.ts:18:1]