{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "ArrayPattern", "elements": [ { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 7 } } }, { "type": "AssignmentPattern", "left": { "type": "ArrayPattern", "elements": [ { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 11 } } }, { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 14 } } } ], "loc": { "start": { "line": 17, "column": 9 }, "end": { "line": 17, "column": 15 } } }, "right": { "type": "ArrayExpression", "elements": [ { "type": "BooleanLiteral", "value": true, "loc": { "start": { "line": 17, "column": 19 }, "end": { "line": 17, "column": 23 } } }, { "type": "StringLiteral", "value": "foo", "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 30 } } } ], "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 17, "column": 31 } } }, "loc": { "start": { "line": 17, "column": 9 }, "end": { "line": 17, "column": 31 } } } ], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 32 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 17, "column": 36 }, "end": { "line": 17, "column": 37 } } }, { "type": "ArrayExpression", "elements": [ { "type": "StringLiteral", "value": "foo", "loc": { "start": { "line": 17, "column": 40 }, "end": { "line": 17, "column": 45 } } }, { "type": "ObjectExpression", "properties": [ { "type": "Property", "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 49 }, "end": { "line": 17, "column": 50 } } }, "value": { "type": "StringLiteral", "value": "foo", "loc": { "start": { "line": 17, "column": 52 }, "end": { "line": 17, "column": 57 } } }, "kind": "init", "loc": { "start": { "line": 17, "column": 49 }, "end": { "line": 17, "column": 57 } } } ], "loc": { "start": { "line": 17, "column": 47 }, "end": { "line": 17, "column": 59 } } } ], "loc": { "start": { "line": 17, "column": 39 }, "end": { "line": 17, "column": 60 } } } ], "loc": { "start": { "line": 17, "column": 35 }, "end": { "line": 17, "column": 61 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 61 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 62 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "c", "decorators": [], "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 2 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 18, "column": 8 } } }, "value": { "type": "NumberLiteral", "value": 5, "loc": { "start": { "line": 18, "column": 10 }, "end": { "line": 18, "column": 11 } } }, "kind": "init", "loc": { "start": { "line": 18, "column": 7 }, "end": { "line": 18, "column": 11 } } } ], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 13 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 13 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 13 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 18, "column": 13 } } } TypeError: Type 'number' is not assignable to type 'string'. [arrayDestructuring24.ts:18:7]