{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSArrayType", "elementType": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 14 } } }, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 16 } } }, "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": 17 } } }, { "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": "ArrayExpression", "elements": [ { "type": "StringLiteral", "value": "foo", "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 11 } } }, { "type": "NumberLiteral", "value": 5, "loc": { "start": { "line": 18, "column": 12 }, "end": { "line": 18, "column": 13 } } } ], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 14 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 14 } } }, "loc": { "start": { "line": 18, "column": 1 }, "end": { "line": 18, "column": 15 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 19, "column": 1 } } } TypeError: Type 'string' is not assignable to type 'number'. [array_8.ts:18:6]