{ "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": "ArrayExpression", "elements": [ { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 12 } } }, { "type": "StringLiteral", "value": "foo", "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 19 } } } ], "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 20 } } }, "loc": { "start": { "line": 17, "column": 6 }, "end": { "line": 17, "column": 20 } } }, { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 23 } } } ], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 24 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "ArrayExpression", "elements": [ { "type": "BooleanLiteral", "value": true, "loc": { "start": { "line": 17, "column": 29 }, "end": { "line": 17, "column": 33 } } }, { "type": "BooleanLiteral", "value": false, "loc": { "start": { "line": 17, "column": 35 }, "end": { "line": 17, "column": 40 } } } ], "loc": { "start": { "line": 17, "column": 28 }, "end": { "line": 17, "column": 41 } } }, { "type": "ArrayExpression", "elements": [ { "type": "StringLiteral", "value": "foo", "loc": { "start": { "line": 17, "column": 44 }, "end": { "line": 17, "column": 49 } } }, { "type": "StringLiteral", "value": "bar", "loc": { "start": { "line": 17, "column": 51 }, "end": { "line": 17, "column": 56 } } } ], "loc": { "start": { "line": 17, "column": 43 }, "end": { "line": 17, "column": 57 } } } ], "loc": { "start": { "line": 17, "column": 27 }, "end": { "line": 17, "column": 58 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 58 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 59 } } }, { "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 'boolean[] | (number | string)[]'. [arrayDestructuring8.ts:18:1]