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