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 "type": "TSNumberKeyword", 33 "loc": { 34 "start": { 35 "line": 17, 36 "column": 17 37 }, 38 "end": { 39 "line": 17, 40 "column": 24 41 } 42 } 43 }, 44 { 45 "type": "TSNumberKeyword", 46 "loc": { 47 "start": { 48 "line": 17, 49 "column": 25 50 }, 51 "end": { 52 "line": 17, 53 "column": 32 54 } 55 } 56 } 57 ], 58 "loc": { 59 "start": { 60 "line": 17, 61 "column": 8 62 }, 63 "end": { 64 "line": 17, 65 "column": 32 66 } 67 } 68 }, 69 { 70 "type": "TSArrayType", 71 "elementType": { 72 "type": "TSNumberKeyword", 73 "loc": { 74 "start": { 75 "line": 17, 76 "column": 35 77 }, 78 "end": { 79 "line": 17, 80 "column": 41 81 } 82 } 83 }, 84 "loc": { 85 "start": { 86 "line": 17, 87 "column": 35 88 }, 89 "end": { 90 "line": 17, 91 "column": 43 92 } 93 } 94 } 95 ], 96 "loc": { 97 "start": { 98 "line": 17, 99 "column": 8 100 }, 101 "end": { 102 "line": 17, 103 "column": 43 104 } 105 } 106 }, 107 "decorators": [], 108 "loc": { 109 "start": { 110 "line": 17, 111 "column": 5 112 }, 113 "end": { 114 "line": 17, 115 "column": 6 116 } 117 } 118 }, 119 "init": null, 120 "loc": { 121 "start": { 122 "line": 17, 123 "column": 5 124 }, 125 "end": { 126 "line": 17, 127 "column": 6 128 } 129 } 130 } 131 ], 132 "kind": "var", 133 "loc": { 134 "start": { 135 "line": 17, 136 "column": 1 137 }, 138 "end": { 139 "line": 17, 140 "column": 44 141 } 142 } 143 }, 144 { 145 "type": "VariableDeclaration", 146 "declarations": [ 147 { 148 "type": "VariableDeclarator", 149 "id": { 150 "type": "Identifier", 151 "name": "b", 152 "typeAnnotation": { 153 "type": "TSUnionType", 154 "types": [ 155 { 156 "type": "TSTupleType", 157 "elementTypes": [ 158 { 159 "type": "TSNumberKeyword", 160 "loc": { 161 "start": { 162 "line": 18, 163 "column": 9 164 }, 165 "end": { 166 "line": 18, 167 "column": 16 168 } 169 } 170 }, 171 { 172 "type": "TSNumberKeyword", 173 "loc": { 174 "start": { 175 "line": 18, 176 "column": 17 177 }, 178 "end": { 179 "line": 18, 180 "column": 24 181 } 182 } 183 }, 184 { 185 "type": "TSNumberKeyword", 186 "loc": { 187 "start": { 188 "line": 18, 189 "column": 25 190 }, 191 "end": { 192 "line": 18, 193 "column": 32 194 } 195 } 196 }, 197 { 198 "type": "TSNumberKeyword", 199 "loc": { 200 "start": { 201 "line": 18, 202 "column": 33 203 }, 204 "end": { 205 "line": 18, 206 "column": 40 207 } 208 } 209 } 210 ], 211 "loc": { 212 "start": { 213 "line": 18, 214 "column": 8 215 }, 216 "end": { 217 "line": 18, 218 "column": 40 219 } 220 } 221 }, 222 { 223 "type": "TSArrayType", 224 "elementType": { 225 "type": "TSStringKeyword", 226 "loc": { 227 "start": { 228 "line": 18, 229 "column": 43 230 }, 231 "end": { 232 "line": 18, 233 "column": 49 234 } 235 } 236 }, 237 "loc": { 238 "start": { 239 "line": 18, 240 "column": 43 241 }, 242 "end": { 243 "line": 18, 244 "column": 51 245 } 246 } 247 } 248 ], 249 "loc": { 250 "start": { 251 "line": 18, 252 "column": 8 253 }, 254 "end": { 255 "line": 18, 256 "column": 51 257 } 258 } 259 }, 260 "decorators": [], 261 "loc": { 262 "start": { 263 "line": 18, 264 "column": 5 265 }, 266 "end": { 267 "line": 18, 268 "column": 6 269 } 270 } 271 }, 272 "init": null, 273 "loc": { 274 "start": { 275 "line": 18, 276 "column": 5 277 }, 278 "end": { 279 "line": 18, 280 "column": 6 281 } 282 } 283 } 284 ], 285 "kind": "var", 286 "loc": { 287 "start": { 288 "line": 18, 289 "column": 1 290 }, 291 "end": { 292 "line": 18, 293 "column": 52 294 } 295 } 296 }, 297 { 298 "type": "ExpressionStatement", 299 "expression": { 300 "type": "AssignmentExpression", 301 "operator": "=", 302 "left": { 303 "type": "Identifier", 304 "name": "a", 305 "decorators": [], 306 "loc": { 307 "start": { 308 "line": 19, 309 "column": 1 310 }, 311 "end": { 312 "line": 19, 313 "column": 2 314 } 315 } 316 }, 317 "right": { 318 "type": "Identifier", 319 "name": "b", 320 "decorators": [], 321 "loc": { 322 "start": { 323 "line": 19, 324 "column": 5 325 }, 326 "end": { 327 "line": 19, 328 "column": 6 329 } 330 } 331 }, 332 "loc": { 333 "start": { 334 "line": 19, 335 "column": 1 336 }, 337 "end": { 338 "line": 19, 339 "column": 6 340 } 341 } 342 }, 343 "loc": { 344 "start": { 345 "line": 19, 346 "column": 1 347 }, 348 "end": { 349 "line": 19, 350 "column": 7 351 } 352 } 353 } 354 ], 355 "loc": { 356 "start": { 357 "line": 1, 358 "column": 1 359 }, 360 "end": { 361 "line": 19, 362 "column": 7 363 } 364 } 365} 366TypeError: Type '[number, number, number, number] | string[]' is not assignable to type '[number, number, number] | number[]'. [tupleAssignability24.ts:19:1] 367