1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "VariableDeclaration", 6 "declarations": [ 7 { 8 "type": "VariableDeclarator", 9 "id": { 10 "type": "ObjectPattern", 11 "properties": [ 12 { 13 "type": "Property", 14 "method": false, 15 "shorthand": true, 16 "computed": false, 17 "key": { 18 "type": "Identifier", 19 "name": "a", 20 "decorators": [], 21 "loc": { 22 "start": { 23 "line": 17, 24 "column": 7 25 }, 26 "end": { 27 "line": 17, 28 "column": 8 29 } 30 } 31 }, 32 "value": { 33 "type": "Identifier", 34 "name": "a", 35 "decorators": [], 36 "loc": { 37 "start": { 38 "line": 17, 39 "column": 7 40 }, 41 "end": { 42 "line": 17, 43 "column": 8 44 } 45 } 46 }, 47 "kind": "init", 48 "loc": { 49 "start": { 50 "line": 17, 51 "column": 7 52 }, 53 "end": { 54 "line": 17, 55 "column": 8 56 } 57 } 58 } 59 ], 60 "typeAnnotation": { 61 "type": "TSUnionType", 62 "types": [ 63 { 64 "type": "TSTypeLiteral", 65 "members": [ 66 { 67 "type": "TSPropertySignature", 68 "computed": false, 69 "optional": false, 70 "readonly": false, 71 "key": { 72 "type": "Identifier", 73 "name": "a", 74 "decorators": [], 75 "loc": { 76 "start": { 77 "line": 17, 78 "column": 14 79 }, 80 "end": { 81 "line": 17, 82 "column": 15 83 } 84 } 85 }, 86 "typeAnnotation": { 87 "type": "TSNumberKeyword", 88 "loc": { 89 "start": { 90 "line": 17, 91 "column": 17 92 }, 93 "end": { 94 "line": 17, 95 "column": 23 96 } 97 } 98 }, 99 "loc": { 100 "start": { 101 "line": 17, 102 "column": 14 103 }, 104 "end": { 105 "line": 17, 106 "column": 25 107 } 108 } 109 } 110 ], 111 "loc": { 112 "start": { 113 "line": 17, 114 "column": 12 115 }, 116 "end": { 117 "line": 17, 118 "column": 25 119 } 120 } 121 }, 122 { 123 "type": "TSTypeLiteral", 124 "members": [ 125 { 126 "type": "TSPropertySignature", 127 "computed": false, 128 "optional": false, 129 "readonly": false, 130 "key": { 131 "type": "Identifier", 132 "name": "a", 133 "decorators": [], 134 "loc": { 135 "start": { 136 "line": 17, 137 "column": 30 138 }, 139 "end": { 140 "line": 17, 141 "column": 31 142 } 143 } 144 }, 145 "typeAnnotation": { 146 "type": "TSNumberKeyword", 147 "loc": { 148 "start": { 149 "line": 17, 150 "column": 33 151 }, 152 "end": { 153 "line": 17, 154 "column": 39 155 } 156 } 157 }, 158 "loc": { 159 "start": { 160 "line": 17, 161 "column": 30 162 }, 163 "end": { 164 "line": 17, 165 "column": 40 166 } 167 } 168 }, 169 { 170 "type": "TSPropertySignature", 171 "computed": false, 172 "optional": false, 173 "readonly": false, 174 "key": { 175 "type": "Identifier", 176 "name": "b", 177 "decorators": [], 178 "loc": { 179 "start": { 180 "line": 17, 181 "column": 41 182 }, 183 "end": { 184 "line": 17, 185 "column": 42 186 } 187 } 188 }, 189 "typeAnnotation": { 190 "type": "TSStringKeyword", 191 "loc": { 192 "start": { 193 "line": 17, 194 "column": 44 195 }, 196 "end": { 197 "line": 17, 198 "column": 50 199 } 200 } 201 }, 202 "loc": { 203 "start": { 204 "line": 17, 205 "column": 41 206 }, 207 "end": { 208 "line": 17, 209 "column": 51 210 } 211 } 212 }, 213 { 214 "type": "TSPropertySignature", 215 "computed": false, 216 "optional": false, 217 "readonly": false, 218 "key": { 219 "type": "Identifier", 220 "name": "c", 221 "decorators": [], 222 "loc": { 223 "start": { 224 "line": 17, 225 "column": 52 226 }, 227 "end": { 228 "line": 17, 229 "column": 53 230 } 231 } 232 }, 233 "typeAnnotation": { 234 "type": "TSTypeLiteral", 235 "members": [ 236 { 237 "type": "TSPropertySignature", 238 "computed": false, 239 "optional": false, 240 "readonly": false, 241 "key": { 242 "type": "Identifier", 243 "name": "a", 244 "decorators": [], 245 "loc": { 246 "start": { 247 "line": 17, 248 "column": 57 249 }, 250 "end": { 251 "line": 17, 252 "column": 58 253 } 254 } 255 }, 256 "typeAnnotation": { 257 "type": "TSNumberKeyword", 258 "loc": { 259 "start": { 260 "line": 17, 261 "column": 60 262 }, 263 "end": { 264 "line": 17, 265 "column": 66 266 } 267 } 268 }, 269 "loc": { 270 "start": { 271 "line": 17, 272 "column": 57 273 }, 274 "end": { 275 "line": 17, 276 "column": 67 277 } 278 } 279 }, 280 { 281 "type": "TSPropertySignature", 282 "computed": false, 283 "optional": false, 284 "readonly": false, 285 "key": { 286 "type": "Identifier", 287 "name": "b", 288 "decorators": [], 289 "loc": { 290 "start": { 291 "line": 17, 292 "column": 68 293 }, 294 "end": { 295 "line": 17, 296 "column": 69 297 } 298 } 299 }, 300 "typeAnnotation": { 301 "type": "TSBooleanKeyword", 302 "loc": { 303 "start": { 304 "line": 17, 305 "column": 71 306 }, 307 "end": { 308 "line": 17, 309 "column": 78 310 } 311 } 312 }, 313 "loc": { 314 "start": { 315 "line": 17, 316 "column": 68 317 }, 318 "end": { 319 "line": 17, 320 "column": 80 321 } 322 } 323 } 324 ], 325 "loc": { 326 "start": { 327 "line": 17, 328 "column": 55 329 }, 330 "end": { 331 "line": 17, 332 "column": 80 333 } 334 } 335 }, 336 "loc": { 337 "start": { 338 "line": 17, 339 "column": 52 340 }, 341 "end": { 342 "line": 17, 343 "column": 82 344 } 345 } 346 } 347 ], 348 "loc": { 349 "start": { 350 "line": 17, 351 "column": 28 352 }, 353 "end": { 354 "line": 17, 355 "column": 82 356 } 357 } 358 }, 359 { 360 "type": "TSNumberKeyword", 361 "loc": { 362 "start": { 363 "line": 17, 364 "column": 85 365 }, 366 "end": { 367 "line": 17, 368 "column": 91 369 } 370 } 371 } 372 ], 373 "loc": { 374 "start": { 375 "line": 17, 376 "column": 12 377 }, 378 "end": { 379 "line": 17, 380 "column": 91 381 } 382 } 383 }, 384 "loc": { 385 "start": { 386 "line": 17, 387 "column": 5 388 }, 389 "end": { 390 "line": 17, 391 "column": 10 392 } 393 } 394 }, 395 "init": { 396 "type": "ObjectExpression", 397 "properties": [ 398 { 399 "type": "Property", 400 "method": false, 401 "shorthand": false, 402 "computed": false, 403 "key": { 404 "type": "Identifier", 405 "name": "a", 406 "decorators": [], 407 "loc": { 408 "start": { 409 "line": 17, 410 "column": 96 411 }, 412 "end": { 413 "line": 17, 414 "column": 97 415 } 416 } 417 }, 418 "value": { 419 "type": "NumberLiteral", 420 "value": 12, 421 "loc": { 422 "start": { 423 "line": 17, 424 "column": 99 425 }, 426 "end": { 427 "line": 17, 428 "column": 101 429 } 430 } 431 }, 432 "kind": "init", 433 "loc": { 434 "start": { 435 "line": 17, 436 "column": 96 437 }, 438 "end": { 439 "line": 17, 440 "column": 101 441 } 442 } 443 } 444 ], 445 "loc": { 446 "start": { 447 "line": 17, 448 "column": 94 449 }, 450 "end": { 451 "line": 17, 452 "column": 103 453 } 454 } 455 }, 456 "loc": { 457 "start": { 458 "line": 17, 459 "column": 5 460 }, 461 "end": { 462 "line": 17, 463 "column": 103 464 } 465 } 466 } 467 ], 468 "kind": "var", 469 "loc": { 470 "start": { 471 "line": 17, 472 "column": 1 473 }, 474 "end": { 475 "line": 17, 476 "column": 104 477 } 478 } 479 } 480 ], 481 "loc": { 482 "start": { 483 "line": 1, 484 "column": 1 485 }, 486 "end": { 487 "line": 17, 488 "column": 104 489 } 490 } 491} 492TypeError: Property a does not exist on type { a: number; } | { a: number; b: string; c: { a: number; b: boolean; }; } | number. [objectDestructuring19.ts:17:5] 493