{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "ArrayPattern", "elements": [ { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 7 } } }, "right": { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 11 } } }, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 11 } } } ], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 12 } } }, "init": { "type": "ArrayExpression", "elements": [], "loc": { "start": { "line": 17, "column": 15 }, "end": { "line": 17, "column": 17 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 17 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 18 } } }, { "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": "StringLiteral", "value": "foo", "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 10 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 10 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 10 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 18, "column": 10 } } } TypeError: Type 'string' is not assignable to type 'number'. [arrayDestructuring2.ts:18:1]