{ "type": "Program", "statements": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "typeAnnotation": { "type": "TSTupleType", "elementTypes": [ { "type": "TSTupleType", "elementTypes": [ { "type": "TSNamedTupleMember", "elementType": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 19 } } }, "label": { "type": "Identifier", "name": "a", "decorators": [], "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 11 } } }, "loc": { "start": { "line": 17, "column": 10 }, "end": { "line": 17, "column": 20 } } }, { "type": "TSNamedTupleMember", "elementType": { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 25 }, "end": { "line": 17, "column": 31 } } }, "label": { "type": "Identifier", "name": "b", "decorators": [], "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 22 } } }, "optional": true, "loc": { "start": { "line": 17, "column": 21 }, "end": { "line": 17, "column": 32 } } } ], "loc": { "start": { "line": 17, "column": 9 }, "end": { "line": 17, "column": 33 } } }, { "type": "TSTupleType", "elementTypes": [ { "type": "TSUnionType", "types": [ { "type": "TSBooleanKeyword", "loc": { "start": { "line": 17, "column": 35 }, "end": { "line": 17, "column": 42 } } }, { "type": "TSStringKeyword", "loc": { "start": { "line": 17, "column": 45 }, "end": { "line": 17, "column": 51 } } } ], "loc": { "start": { "line": 17, "column": 35 }, "end": { "line": 17, "column": 52 } } }, { "type": "TSArrayType", "elementType": { "type": "TSNumberKeyword", "loc": { "start": { "line": 17, "column": 53 }, "end": { "line": 17, "column": 59 } } }, "loc": { "start": { "line": 17, "column": 53 }, "end": { "line": 17, "column": 62 } } } ], "loc": { "start": { "line": 17, "column": 34 }, "end": { "line": 17, "column": 63 } } } ], "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 63 } } }, "decorators": [], "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 6 } } }, "init": { "type": "ArrayExpression", "elements": [ { "type": "ArrayExpression", "elements": [ { "type": "NumberLiteral", "value": 1, "loc": { "start": { "line": 17, "column": 68 }, "end": { "line": 17, "column": 69 } } } ], "loc": { "start": { "line": 17, "column": 67 }, "end": { "line": 17, "column": 70 } } }, { "type": "ArrayExpression", "elements": [ { "type": "NumberLiteral", "value": 2, "loc": { "start": { "line": 17, "column": 73 }, "end": { "line": 17, "column": 74 } } }, { "type": "ArrayExpression", "elements": [ { "type": "NumberLiteral", "value": 3, "loc": { "start": { "line": 17, "column": 77 }, "end": { "line": 17, "column": 78 } } }, { "type": "NumberLiteral", "value": 4, "loc": { "start": { "line": 17, "column": 80 }, "end": { "line": 17, "column": 81 } } } ], "loc": { "start": { "line": 17, "column": 76 }, "end": { "line": 17, "column": 82 } } } ], "loc": { "start": { "line": 17, "column": 72 }, "end": { "line": 17, "column": 83 } } } ], "loc": { "start": { "line": 17, "column": 66 }, "end": { "line": 17, "column": 84 } } }, "loc": { "start": { "line": 17, "column": 5 }, "end": { "line": 17, "column": 84 } } } ], "kind": "var", "loc": { "start": { "line": 17, "column": 1 }, "end": { "line": 17, "column": 85 } } } ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 17, "column": 85 } } } TypeError: Type 'number' is not assignable to type 'boolean | string'. [tupleAssignability7.ts:17:73]