• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "VariableDeclaration",
6      "declarations": [
7        {
8          "type": "VariableDeclarator",
9          "id": {
10            "type": "Identifier",
11            "name": "e",
12            "typeAnnotation": {
13              "type": "TSVoidKeyword",
14              "loc": {
15                "start": {
16                  "line": 16,
17                  "column": 8
18                },
19                "end": {
20                  "line": 16,
21                  "column": 12
22                }
23              }
24            },
25            "decorators": [],
26            "loc": {
27              "start": {
28                "line": 16,
29                "column": 5
30              },
31              "end": {
32                "line": 16,
33                "column": 6
34              }
35            }
36          },
37          "init": null,
38          "loc": {
39            "start": {
40              "line": 16,
41              "column": 5
42            },
43            "end": {
44              "line": 16,
45              "column": 6
46            }
47          }
48        }
49      ],
50      "kind": "var",
51      "loc": {
52        "start": {
53          "line": 16,
54          "column": 1
55        },
56        "end": {
57          "line": 16,
58          "column": 13
59        }
60      }
61    },
62    {
63      "type": "VariableDeclaration",
64      "declarations": [
65        {
66          "type": "VariableDeclarator",
67          "id": {
68            "type": "Identifier",
69            "name": "u",
70            "typeAnnotation": {
71              "type": "TSTypeLiteral",
72              "members": [
73                {
74                  "type": "TSPropertySignature",
75                  "computed": false,
76                  "optional": false,
77                  "readonly": false,
78                  "key": {
79                    "type": "Identifier",
80                    "name": "a",
81                    "decorators": [],
82                    "loc": {
83                      "start": {
84                        "line": 17,
85                        "column": 10
86                      },
87                      "end": {
88                        "line": 17,
89                        "column": 11
90                      }
91                    }
92                  },
93                  "typeAnnotation": {
94                    "type": "TSNumberKeyword",
95                    "loc": {
96                      "start": {
97                        "line": 17,
98                        "column": 13
99                      },
100                      "end": {
101                        "line": 17,
102                        "column": 19
103                      }
104                    }
105                  },
106                  "loc": {
107                    "start": {
108                      "line": 17,
109                      "column": 10
110                    },
111                    "end": {
112                      "line": 17,
113                      "column": 20
114                    }
115                  }
116                },
117                {
118                  "type": "TSPropertySignature",
119                  "computed": false,
120                  "optional": false,
121                  "readonly": false,
122                  "key": {
123                    "type": "Identifier",
124                    "name": "b",
125                    "decorators": [],
126                    "loc": {
127                      "start": {
128                        "line": 17,
129                        "column": 21
130                      },
131                      "end": {
132                        "line": 17,
133                        "column": 22
134                      }
135                    }
136                  },
137                  "typeAnnotation": {
138                    "type": "TSStringKeyword",
139                    "loc": {
140                      "start": {
141                        "line": 17,
142                        "column": 24
143                      },
144                      "end": {
145                        "line": 17,
146                        "column": 30
147                      }
148                    }
149                  },
150                  "loc": {
151                    "start": {
152                      "line": 17,
153                      "column": 21
154                    },
155                    "end": {
156                      "line": 17,
157                      "column": 32
158                    }
159                  }
160                }
161              ],
162              "loc": {
163                "start": {
164                  "line": 17,
165                  "column": 8
166                },
167                "end": {
168                  "line": 17,
169                  "column": 32
170                }
171              }
172            },
173            "decorators": [],
174            "loc": {
175              "start": {
176                "line": 17,
177                "column": 5
178              },
179              "end": {
180                "line": 17,
181                "column": 6
182              }
183            }
184          },
185          "init": null,
186          "loc": {
187            "start": {
188              "line": 17,
189              "column": 5
190            },
191            "end": {
192              "line": 17,
193              "column": 6
194            }
195          }
196        }
197      ],
198      "kind": "var",
199      "loc": {
200        "start": {
201          "line": 17,
202          "column": 1
203        },
204        "end": {
205          "line": 17,
206          "column": 33
207        }
208      }
209    },
210    {
211      "type": "VariableDeclaration",
212      "declarations": [
213        {
214          "type": "VariableDeclarator",
215          "id": {
216            "type": "ObjectPattern",
217            "properties": [
218              {
219                "type": "Property",
220                "method": false,
221                "shorthand": false,
222                "computed": false,
223                "key": {
224                  "type": "Identifier",
225                  "name": "a",
226                  "decorators": [],
227                  "loc": {
228                    "start": {
229                      "line": 18,
230                      "column": 7
231                    },
232                    "end": {
233                      "line": 18,
234                      "column": 8
235                    }
236                  }
237                },
238                "value": {
239                  "type": "AssignmentPattern",
240                  "left": {
241                    "type": "ObjectPattern",
242                    "properties": [
243                      {
244                        "type": "Property",
245                        "method": false,
246                        "shorthand": false,
247                        "computed": false,
248                        "key": {
249                          "type": "Identifier",
250                          "name": "b",
251                          "decorators": [],
252                          "loc": {
253                            "start": {
254                              "line": 18,
255                              "column": 12
256                            },
257                            "end": {
258                              "line": 18,
259                              "column": 13
260                            }
261                          }
262                        },
263                        "value": {
264                          "type": "AssignmentPattern",
265                          "left": {
266                            "type": "ArrayPattern",
267                            "elements": [
268                              {
269                                "type": "AssignmentPattern",
270                                "left": {
271                                  "type": "Identifier",
272                                  "name": "c",
273                                  "decorators": [],
274                                  "loc": {
275                                    "start": {
276                                      "line": 18,
277                                      "column": 16
278                                    },
279                                    "end": {
280                                      "line": 18,
281                                      "column": 17
282                                    }
283                                  }
284                                },
285                                "right": {
286                                  "type": "Identifier",
287                                  "name": "u",
288                                  "decorators": [],
289                                  "loc": {
290                                    "start": {
291                                      "line": 18,
292                                      "column": 20
293                                    },
294                                    "end": {
295                                      "line": 18,
296                                      "column": 21
297                                    }
298                                  }
299                                },
300                                "loc": {
301                                  "start": {
302                                    "line": 18,
303                                    "column": 16
304                                  },
305                                  "end": {
306                                    "line": 18,
307                                    "column": 21
308                                  }
309                                }
310                              },
311                              {
312                                "type": "Identifier",
313                                "name": "d",
314                                "decorators": [],
315                                "loc": {
316                                  "start": {
317                                    "line": 18,
318                                    "column": 23
319                                  },
320                                  "end": {
321                                    "line": 18,
322                                    "column": 24
323                                  }
324                                }
325                              }
326                            ],
327                            "loc": {
328                              "start": {
329                                "line": 18,
330                                "column": 15
331                              },
332                              "end": {
333                                "line": 18,
334                                "column": 25
335                              }
336                            }
337                          },
338                          "right": {
339                            "type": "ArrayExpression",
340                            "elements": [
341                              {
342                                "type": "NumberLiteral",
343                                "value": 1,
344                                "loc": {
345                                  "start": {
346                                    "line": 18,
347                                    "column": 29
348                                  },
349                                  "end": {
350                                    "line": 18,
351                                    "column": 30
352                                  }
353                                }
354                              },
355                              {
356                                "type": "BooleanLiteral",
357                                "value": true,
358                                "loc": {
359                                  "start": {
360                                    "line": 18,
361                                    "column": 32
362                                  },
363                                  "end": {
364                                    "line": 18,
365                                    "column": 36
366                                  }
367                                }
368                              }
369                            ],
370                            "loc": {
371                              "start": {
372                                "line": 18,
373                                "column": 28
374                              },
375                              "end": {
376                                "line": 18,
377                                "column": 37
378                              }
379                            }
380                          },
381                          "loc": {
382                            "start": {
383                              "line": 18,
384                              "column": 15
385                            },
386                            "end": {
387                              "line": 18,
388                              "column": 37
389                            }
390                          }
391                        },
392                        "kind": "init",
393                        "loc": {
394                          "start": {
395                            "line": 18,
396                            "column": 12
397                          },
398                          "end": {
399                            "line": 18,
400                            "column": 37
401                          }
402                        }
403                      }
404                    ],
405                    "loc": {
406                      "start": {
407                        "line": 18,
408                        "column": 10
409                      },
410                      "end": {
411                        "line": 18,
412                        "column": 39
413                      }
414                    }
415                  },
416                  "right": {
417                    "type": "ObjectExpression",
418                    "properties": [
419                      {
420                        "type": "Property",
421                        "method": false,
422                        "shorthand": false,
423                        "computed": false,
424                        "key": {
425                          "type": "Identifier",
426                          "name": "b",
427                          "decorators": [],
428                          "loc": {
429                            "start": {
430                              "line": 18,
431                              "column": 44
432                            },
433                            "end": {
434                              "line": 18,
435                              "column": 45
436                            }
437                          }
438                        },
439                        "value": {
440                          "type": "ArrayExpression",
441                          "elements": [
442                            {
443                              "type": "BigIntLiteral",
444                              "value": "2",
445                              "loc": {
446                                "start": {
447                                  "line": 18,
448                                  "column": 48
449                                },
450                                "end": {
451                                  "line": 18,
452                                  "column": 50
453                                }
454                              }
455                            }
456                          ],
457                          "loc": {
458                            "start": {
459                              "line": 18,
460                              "column": 47
461                            },
462                            "end": {
463                              "line": 18,
464                              "column": 51
465                            }
466                          }
467                        },
468                        "kind": "init",
469                        "loc": {
470                          "start": {
471                            "line": 18,
472                            "column": 44
473                          },
474                          "end": {
475                            "line": 18,
476                            "column": 51
477                          }
478                        }
479                      }
480                    ],
481                    "loc": {
482                      "start": {
483                        "line": 18,
484                        "column": 42
485                      },
486                      "end": {
487                        "line": 18,
488                        "column": 53
489                      }
490                    }
491                  },
492                  "loc": {
493                    "start": {
494                      "line": 18,
495                      "column": 10
496                    },
497                    "end": {
498                      "line": 18,
499                      "column": 53
500                    }
501                  }
502                },
503                "kind": "init",
504                "loc": {
505                  "start": {
506                    "line": 18,
507                    "column": 7
508                  },
509                  "end": {
510                    "line": 18,
511                    "column": 53
512                  }
513                }
514              }
515            ],
516            "loc": {
517              "start": {
518                "line": 18,
519                "column": 5
520              },
521              "end": {
522                "line": 18,
523                "column": 55
524              }
525            }
526          },
527          "init": {
528            "type": "ObjectExpression",
529            "properties": [
530              {
531                "type": "Property",
532                "method": false,
533                "shorthand": false,
534                "computed": false,
535                "key": {
536                  "type": "Identifier",
537                  "name": "a",
538                  "decorators": [],
539                  "loc": {
540                    "start": {
541                      "line": 18,
542                      "column": 60
543                    },
544                    "end": {
545                      "line": 18,
546                      "column": 61
547                    }
548                  }
549                },
550                "value": {
551                  "type": "ObjectExpression",
552                  "properties": [
553                    {
554                      "type": "Property",
555                      "method": false,
556                      "shorthand": false,
557                      "computed": false,
558                      "key": {
559                        "type": "Identifier",
560                        "name": "k",
561                        "decorators": [],
562                        "loc": {
563                          "start": {
564                            "line": 18,
565                            "column": 65
566                          },
567                          "end": {
568                            "line": 18,
569                            "column": 66
570                          }
571                        }
572                      },
573                      "value": {
574                        "type": "NumberLiteral",
575                        "value": 2,
576                        "loc": {
577                          "start": {
578                            "line": 18,
579                            "column": 68
580                          },
581                          "end": {
582                            "line": 18,
583                            "column": 69
584                          }
585                        }
586                      },
587                      "kind": "init",
588                      "loc": {
589                        "start": {
590                          "line": 18,
591                          "column": 65
592                        },
593                        "end": {
594                          "line": 18,
595                          "column": 69
596                        }
597                      }
598                    },
599                    {
600                      "type": "Property",
601                      "method": false,
602                      "shorthand": false,
603                      "computed": false,
604                      "key": {
605                        "type": "Identifier",
606                        "name": "b",
607                        "decorators": [],
608                        "loc": {
609                          "start": {
610                            "line": 18,
611                            "column": 71
612                          },
613                          "end": {
614                            "line": 18,
615                            "column": 72
616                          }
617                        }
618                      },
619                      "value": {
620                        "type": "ArrayExpression",
621                        "elements": [
622                          {
623                            "type": "StringLiteral",
624                            "value": "foo",
625                            "loc": {
626                              "start": {
627                                "line": 18,
628                                "column": 75
629                              },
630                              "end": {
631                                "line": 18,
632                                "column": 80
633                              }
634                            }
635                          },
636                          {
637                            "type": "BigIntLiteral",
638                            "value": "2",
639                            "loc": {
640                              "start": {
641                                "line": 18,
642                                "column": 82
643                              },
644                              "end": {
645                                "line": 18,
646                                "column": 84
647                              }
648                            }
649                          }
650                        ],
651                        "loc": {
652                          "start": {
653                            "line": 18,
654                            "column": 74
655                          },
656                          "end": {
657                            "line": 18,
658                            "column": 85
659                          }
660                        }
661                      },
662                      "kind": "init",
663                      "loc": {
664                        "start": {
665                          "line": 18,
666                          "column": 71
667                        },
668                        "end": {
669                          "line": 18,
670                          "column": 85
671                        }
672                      }
673                    }
674                  ],
675                  "loc": {
676                    "start": {
677                      "line": 18,
678                      "column": 63
679                    },
680                    "end": {
681                      "line": 18,
682                      "column": 87
683                    }
684                  }
685                },
686                "kind": "init",
687                "loc": {
688                  "start": {
689                    "line": 18,
690                    "column": 60
691                  },
692                  "end": {
693                    "line": 18,
694                    "column": 87
695                  }
696                }
697              }
698            ],
699            "loc": {
700              "start": {
701                "line": 18,
702                "column": 58
703              },
704              "end": {
705                "line": 18,
706                "column": 89
707              }
708            }
709          },
710          "loc": {
711            "start": {
712              "line": 18,
713              "column": 5
714            },
715            "end": {
716              "line": 18,
717              "column": 89
718            }
719          }
720        }
721      ],
722      "kind": "var",
723      "loc": {
724        "start": {
725          "line": 18,
726          "column": 1
727        },
728        "end": {
729          "line": 18,
730          "column": 90
731        }
732      }
733    },
734    {
735      "type": "ExpressionStatement",
736      "expression": {
737        "type": "AssignmentExpression",
738        "operator": "=",
739        "left": {
740          "type": "Identifier",
741          "name": "c",
742          "decorators": [],
743          "loc": {
744            "start": {
745              "line": 19,
746              "column": 1
747            },
748            "end": {
749              "line": 19,
750              "column": 2
751            }
752          }
753        },
754        "right": {
755          "type": "Identifier",
756          "name": "e",
757          "decorators": [],
758          "loc": {
759            "start": {
760              "line": 19,
761              "column": 5
762            },
763            "end": {
764              "line": 19,
765              "column": 6
766            }
767          }
768        },
769        "loc": {
770          "start": {
771            "line": 19,
772            "column": 1
773          },
774          "end": {
775            "line": 19,
776            "column": 6
777          }
778        }
779      },
780      "loc": {
781        "start": {
782          "line": 19,
783          "column": 1
784        },
785        "end": {
786          "line": 19,
787          "column": 7
788        }
789      }
790    }
791  ],
792  "loc": {
793    "start": {
794      "line": 1,
795      "column": 1
796    },
797    "end": {
798      "line": 21,
799      "column": 1
800    }
801  }
802}
803TypeError: Type 'void' is not assignable to type 'string | bigint | number | { a: number; b: string; }'. [objectDestructuring28.ts:19:1]
804