• 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": "BigIntLiteral",
76                            "value": "5",
77                            "loc": {
78                              "start": {
79                                "line": 17,
80                                "column": 16
81                              },
82                              "end": {
83                                "line": 17,
84                                "column": 18
85                              }
86                            }
87                          },
88                          "loc": {
89                            "start": {
90                              "line": 17,
91                              "column": 12
92                            },
93                            "end": {
94                              "line": 17,
95                              "column": 18
96                            }
97                          }
98                        },
99                        "kind": "init",
100                        "loc": {
101                          "start": {
102                            "line": 17,
103                            "column": 12
104                          },
105                          "end": {
106                            "line": 17,
107                            "column": 18
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": 20
124                            },
125                            "end": {
126                              "line": 17,
127                              "column": 21
128                            }
129                          }
130                        },
131                        "value": {
132                          "type": "Identifier",
133                          "name": "b",
134                          "decorators": [],
135                          "loc": {
136                            "start": {
137                              "line": 17,
138                              "column": 20
139                            },
140                            "end": {
141                              "line": 17,
142                              "column": 21
143                            }
144                          }
145                        },
146                        "kind": "init",
147                        "loc": {
148                          "start": {
149                            "line": 17,
150                            "column": 20
151                          },
152                          "end": {
153                            "line": 17,
154                            "column": 21
155                          }
156                        }
157                      }
158                    ],
159                    "loc": {
160                      "start": {
161                        "line": 17,
162                        "column": 10
163                      },
164                      "end": {
165                        "line": 17,
166                        "column": 23
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": "b",
181                          "decorators": [],
182                          "loc": {
183                            "start": {
184                              "line": 17,
185                              "column": 28
186                            },
187                            "end": {
188                              "line": 17,
189                              "column": 29
190                            }
191                          }
192                        },
193                        "value": {
194                          "type": "StringLiteral",
195                          "value": "foo",
196                          "loc": {
197                            "start": {
198                              "line": 17,
199                              "column": 31
200                            },
201                            "end": {
202                              "line": 17,
203                              "column": 36
204                            }
205                          }
206                        },
207                        "kind": "init",
208                        "loc": {
209                          "start": {
210                            "line": 17,
211                            "column": 28
212                          },
213                          "end": {
214                            "line": 17,
215                            "column": 36
216                          }
217                        }
218                      }
219                    ],
220                    "loc": {
221                      "start": {
222                        "line": 17,
223                        "column": 26
224                      },
225                      "end": {
226                        "line": 17,
227                        "column": 38
228                      }
229                    }
230                  },
231                  "loc": {
232                    "start": {
233                      "line": 17,
234                      "column": 10
235                    },
236                    "end": {
237                      "line": 17,
238                      "column": 38
239                    }
240                  }
241                },
242                "kind": "init",
243                "loc": {
244                  "start": {
245                    "line": 17,
246                    "column": 7
247                  },
248                  "end": {
249                    "line": 17,
250                    "column": 38
251                  }
252                }
253              }
254            ],
255            "loc": {
256              "start": {
257                "line": 17,
258                "column": 5
259              },
260              "end": {
261                "line": 17,
262                "column": 40
263              }
264            }
265          },
266          "init": {
267            "type": "ObjectExpression",
268            "properties": [
269              {
270                "type": "Property",
271                "method": false,
272                "shorthand": false,
273                "computed": false,
274                "key": {
275                  "type": "Identifier",
276                  "name": "a",
277                  "decorators": [],
278                  "loc": {
279                    "start": {
280                      "line": 17,
281                      "column": 45
282                    },
283                    "end": {
284                      "line": 17,
285                      "column": 46
286                    }
287                  }
288                },
289                "value": {
290                  "type": "ObjectExpression",
291                  "properties": [
292                    {
293                      "type": "Property",
294                      "method": false,
295                      "shorthand": false,
296                      "computed": false,
297                      "key": {
298                        "type": "Identifier",
299                        "name": "a",
300                        "decorators": [],
301                        "loc": {
302                          "start": {
303                            "line": 17,
304                            "column": 50
305                          },
306                          "end": {
307                            "line": 17,
308                            "column": 51
309                          }
310                        }
311                      },
312                      "value": {
313                        "type": "NumberLiteral",
314                        "value": 5,
315                        "loc": {
316                          "start": {
317                            "line": 17,
318                            "column": 53
319                          },
320                          "end": {
321                            "line": 17,
322                            "column": 54
323                          }
324                        }
325                      },
326                      "kind": "init",
327                      "loc": {
328                        "start": {
329                          "line": 17,
330                          "column": 50
331                        },
332                        "end": {
333                          "line": 17,
334                          "column": 54
335                        }
336                      }
337                    },
338                    {
339                      "type": "Property",
340                      "method": false,
341                      "shorthand": false,
342                      "computed": false,
343                      "key": {
344                        "type": "Identifier",
345                        "name": "b",
346                        "decorators": [],
347                        "loc": {
348                          "start": {
349                            "line": 17,
350                            "column": 56
351                          },
352                          "end": {
353                            "line": 17,
354                            "column": 57
355                          }
356                        }
357                      },
358                      "value": {
359                        "type": "BooleanLiteral",
360                        "value": true,
361                        "loc": {
362                          "start": {
363                            "line": 17,
364                            "column": 59
365                          },
366                          "end": {
367                            "line": 17,
368                            "column": 63
369                          }
370                        }
371                      },
372                      "kind": "init",
373                      "loc": {
374                        "start": {
375                          "line": 17,
376                          "column": 56
377                        },
378                        "end": {
379                          "line": 17,
380                          "column": 63
381                        }
382                      }
383                    }
384                  ],
385                  "loc": {
386                    "start": {
387                      "line": 17,
388                      "column": 48
389                    },
390                    "end": {
391                      "line": 17,
392                      "column": 65
393                    }
394                  }
395                },
396                "kind": "init",
397                "loc": {
398                  "start": {
399                    "line": 17,
400                    "column": 45
401                  },
402                  "end": {
403                    "line": 17,
404                    "column": 65
405                  }
406                }
407              }
408            ],
409            "loc": {
410              "start": {
411                "line": 17,
412                "column": 43
413              },
414              "end": {
415                "line": 17,
416                "column": 67
417              }
418            }
419          },
420          "loc": {
421            "start": {
422              "line": 17,
423              "column": 5
424            },
425            "end": {
426              "line": 17,
427              "column": 67
428            }
429          }
430        }
431      ],
432      "kind": "var",
433      "loc": {
434        "start": {
435          "line": 17,
436          "column": 1
437        },
438        "end": {
439          "line": 17,
440          "column": 68
441        }
442      }
443    },
444    {
445      "type": "ExpressionStatement",
446      "expression": {
447        "type": "AssignmentExpression",
448        "operator": "=",
449        "left": {
450          "type": "Identifier",
451          "name": "a",
452          "decorators": [],
453          "loc": {
454            "start": {
455              "line": 18,
456              "column": 1
457            },
458            "end": {
459              "line": 18,
460              "column": 2
461            }
462          }
463        },
464        "right": {
465          "type": "ObjectExpression",
466          "properties": [],
467          "loc": {
468            "start": {
469              "line": 18,
470              "column": 5
471            },
472            "end": {
473              "line": 18,
474              "column": 7
475            }
476          }
477        },
478        "loc": {
479          "start": {
480            "line": 18,
481            "column": 1
482          },
483          "end": {
484            "line": 18,
485            "column": 7
486          }
487        }
488      },
489      "loc": {
490        "start": {
491          "line": 18,
492          "column": 1
493        },
494        "end": {
495          "line": 18,
496          "column": 8
497        }
498      }
499    }
500  ],
501  "loc": {
502    "start": {
503      "line": 1,
504      "column": 1
505    },
506    "end": {
507      "line": 18,
508      "column": 8
509    }
510  }
511}
512TypeError: Type '{ }' is not assignable to type 'number | bigint'. [objectDestructuring12.ts:18:1]
513