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