{ "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 } } } ], "typeAnnotation": { "type": "TSUnionType", "types": [ { "type": "TSTupleType", "elementTypes": [ { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 21 } } }, { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 22 }, "end": { "line": 17, "column": 29 } } } ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 29 } } }, { "type": "TSArrayType", "elementType": { "type": "TSBooleanKeyword", "loc": { "start": { "line": 17, "column": 32 }, "end": { "line": 17, "column": 39 } } }, "loc": { "start": { "line": 17, "column": 32 }, "end": { "line": 17, "column": 41 } } }, { "type": "TSTupleType", "elementTypes": [ { "type": "TSBigIntKeyword", "loc": { "start": { "line": 17, "column": 45 }, "end": { "line": 17, "column": 52 } } }, { "type": "TSVoidKeyword", "loc": { "start": { "line": 17, "column": 53 }, "end": { "line": 17, "column": 58 } } }, { "type": "TSTypeLiteral", "members": [], "loc": { "start": { "line": 17, "column": 59 }, "end": { "line": 17, "column": 62 } } } ], "loc": { "start": { "line": 17, "column": 44 }, "end": { "line": 17, "column": 62 } } } ], "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 62 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 11 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "BooleanLiteral", "value": true, "loc": { "start": { "line": 17, "column": 66 }, "end": { "line": 17, "column": 70 } } }, { "type": "BooleanLiteral", "value": false, "loc": { "start": { "line": 17, "column": 72 }, "end": { "line": 17, "column": 77 } } } ], "loc": { "start": { "line": 17, "column": 65 }, "end": { "line": 17, "column": 78 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 78 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 79 } } }, { "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 | bigint | void | { })[]'. [arrayDestructuring18.ts:18:1]