{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 14 } } }, "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": 15 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 6 } } }, "init": { "type": "NumberLiteral", "value": 5, "loc": { "start": { "line": 18, "column": 9 }, "end": { "line": 18, "column": 10 } } }, "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 10 } } } ], "kind": "var", "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 11 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "ArrayPattern", "elements": [ { "type": "ArrayPattern", "elements": [ { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 19, "column": 3 }, "end": { "line": 19, "column": 4 } } } ], "loc": { "start": { "line": 19, "column": 2 }, "end": { "line": 19, "column": 5 } } } ], "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 6 } } }, "right": { "type": "ArrayExpression", "elements": [ { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 19, "column": 10 }, "end": { "line": 19, "column": 11 } } } ], "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 12 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 12 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 13 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 19, "column": 13 } } } TypeError: Type number must have a '[Symbol.iterator]()' method that returns an iterator. [arrayDestructuring41.ts:19:2]