{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSTupleType", "elementTypes": [ { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 9 }, "end": { "line": 17, "column": 16 } } }, { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 17 }, "end": { "line": 17, "column": 24 } } } ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 24 } } }, "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": 25 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 18, "column": 5 }, "end": { "line": 18, "column": 6 } } }, "init": { "type": "Identifier", "name": "a", "decorators": [], "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": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 2 } } }, "right": { "type": "TSAsExpression", "expression": { "type": "ArrayExpression", "elements": [ { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 7 } } }, { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 19, "column": 9 }, "end": { "line": 19, "column": 10 } } }, { "type": "NumberLiteral", "value": 3, "loc": { "start": { "line": 19, "column": 12 }, "end": { "line": 19, "column": 13 } } } ], "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 14 } } }, "typeAnnotation": { "type": "TSTupleType", "elementTypes": [ { "type": "TSNumberKeyword", "loc": { "start": { "line": 19, "column": 19 }, "end": { "line": 19, "column": 26 } } }, { "type": "TSNumberKeyword", "loc": { "start": { "line": 19, "column": 27 }, "end": { "line": 19, "column": 34 } } }, { "type": "TSNumberKeyword", "loc": { "start": { "line": 19, "column": 35 }, "end": { "line": 19, "column": 42 } } } ], "loc": { "start": { "line": 19, "column": 18 }, "end": { "line": 19, "column": 42 } } }, "loc": { "start": { "line": 19, "column": 5 }, "end": { "line": 19, "column": 43 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 43 } } }, "loc": { "start": { "line": 19, "column": 1 }, "end": { "line": 19, "column": 43 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 19, "column": 43 } } } TypeError: Type '[number, number, number]' is not assignable to type '[number, string]'. [tupleAssignability17.ts:19:1]