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