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