1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "VariableDeclaration", 6 "declarations": [ 7 { 8 "type": "VariableDeclarator", 9 "id": { 10 "type": "Identifier", 11 "name": "a", 12 "typeAnnotation": { 13 "type": "TSUnionType", 14 "types": [ 15 { 16 "type": "TSTupleType", 17 "elementTypes": [ 18 { 19 "type": "TSNumberKeyword", 20 "loc": { 21 "start": { 22 "line": 17, 23 "column": 9 24 }, 25 "end": { 26 "line": 17, 27 "column": 16 28 } 29 } 30 } 31 ], 32 "loc": { 33 "start": { 34 "line": 17, 35 "column": 8 36 }, 37 "end": { 38 "line": 17, 39 "column": 16 40 } 41 } 42 }, 43 { 44 "type": "TSTupleType", 45 "elementTypes": [ 46 { 47 "type": "TSStringKeyword", 48 "loc": { 49 "start": { 50 "line": 17, 51 "column": 20 52 }, 53 "end": { 54 "line": 17, 55 "column": 27 56 } 57 } 58 } 59 ], 60 "loc": { 61 "start": { 62 "line": 17, 63 "column": 19 64 }, 65 "end": { 66 "line": 17, 67 "column": 27 68 } 69 } 70 } 71 ], 72 "loc": { 73 "start": { 74 "line": 17, 75 "column": 8 76 }, 77 "end": { 78 "line": 17, 79 "column": 27 80 } 81 } 82 }, 83 "decorators": [], 84 "loc": { 85 "start": { 86 "line": 17, 87 "column": 5 88 }, 89 "end": { 90 "line": 17, 91 "column": 6 92 } 93 } 94 }, 95 "init": { 96 "type": "ArrayExpression", 97 "elements": [ 98 { 99 "type": "BooleanLiteral", 100 "value": true, 101 "loc": { 102 "start": { 103 "line": 17, 104 "column": 31 105 }, 106 "end": { 107 "line": 17, 108 "column": 35 109 } 110 } 111 } 112 ], 113 "loc": { 114 "start": { 115 "line": 17, 116 "column": 30 117 }, 118 "end": { 119 "line": 17, 120 "column": 36 121 } 122 } 123 }, 124 "loc": { 125 "start": { 126 "line": 17, 127 "column": 5 128 }, 129 "end": { 130 "line": 17, 131 "column": 36 132 } 133 } 134 } 135 ], 136 "kind": "var", 137 "loc": { 138 "start": { 139 "line": 17, 140 "column": 1 141 }, 142 "end": { 143 "line": 17, 144 "column": 37 145 } 146 } 147 } 148 ], 149 "loc": { 150 "start": { 151 "line": 1, 152 "column": 1 153 }, 154 "end": { 155 "line": 17, 156 "column": 37 157 } 158 } 159} 160TypeError: Type 'boolean' is not assignable to type 'number | string'. [tupleAssignability19.ts:17:31] 161