{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSUnionType", "types": [ { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 14 } } }, { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 23 } } } ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 23 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 6 } } }, "init": null, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 6 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 24 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "ArrayPattern", "elements": [ { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 19, "column": 2 }, "end": { "line": 19, "column": 3 } } }, "right": { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 7 } } }, "loc": { "start": { "line": 19, "column": 2 }, "end": { "line": 19, "column": 7 } } } ], "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 8 } } }, "right": { "type": "ArrayExpression", "elements": [ { "type": "BooleanLiteral", "value": false, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 17 } } } ], "loc": { "start": { "line": 19, "column": 11 }, "end": { "line": 19, "column": 18 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 18 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 19 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 19, "column": 19 } } } TypeError: Type 'boolean' is not assignable to type 'string | number'. [arrayDestructuring35.ts:19:2]