• 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": "Identifier",
59                          "name": "a",
60                          "decorators": [],
61                          "loc": {
62                            "start": {
63                              "line": 17,
64                              "column": 12
65                            },
66                            "end": {
67                              "line": 17,
68                              "column": 13
69                            }
70                          }
71                        },
72                        "kind": "init",
73                        "loc": {
74                          "start": {
75                            "line": 17,
76                            "column": 12
77                          },
78                          "end": {
79                            "line": 17,
80                            "column": 13
81                          }
82                        }
83                      },
84                      {
85                        "type": "Property",
86                        "method": false,
87                        "shorthand": true,
88                        "computed": false,
89                        "key": {
90                          "type": "Identifier",
91                          "name": "b",
92                          "decorators": [],
93                          "loc": {
94                            "start": {
95                              "line": 17,
96                              "column": 15
97                            },
98                            "end": {
99                              "line": 17,
100                              "column": 16
101                            }
102                          }
103                        },
104                        "value": {
105                          "type": "Identifier",
106                          "name": "b",
107                          "decorators": [],
108                          "loc": {
109                            "start": {
110                              "line": 17,
111                              "column": 15
112                            },
113                            "end": {
114                              "line": 17,
115                              "column": 16
116                            }
117                          }
118                        },
119                        "kind": "init",
120                        "loc": {
121                          "start": {
122                            "line": 17,
123                            "column": 15
124                          },
125                          "end": {
126                            "line": 17,
127                            "column": 16
128                          }
129                        }
130                      }
131                    ],
132                    "loc": {
133                      "start": {
134                        "line": 17,
135                        "column": 10
136                      },
137                      "end": {
138                        "line": 17,
139                        "column": 18
140                      }
141                    }
142                  },
143                  "right": {
144                    "type": "ObjectExpression",
145                    "properties": [
146                      {
147                        "type": "Property",
148                        "method": false,
149                        "shorthand": false,
150                        "computed": false,
151                        "key": {
152                          "type": "Identifier",
153                          "name": "a",
154                          "decorators": [],
155                          "loc": {
156                            "start": {
157                              "line": 17,
158                              "column": 23
159                            },
160                            "end": {
161                              "line": 17,
162                              "column": 24
163                            }
164                          }
165                        },
166                        "value": {
167                          "type": "NumberLiteral",
168                          "value": 1,
169                          "loc": {
170                            "start": {
171                              "line": 17,
172                              "column": 26
173                            },
174                            "end": {
175                              "line": 17,
176                              "column": 27
177                            }
178                          }
179                        },
180                        "kind": "init",
181                        "loc": {
182                          "start": {
183                            "line": 17,
184                            "column": 23
185                          },
186                          "end": {
187                            "line": 17,
188                            "column": 27
189                          }
190                        }
191                      },
192                      {
193                        "type": "Property",
194                        "method": false,
195                        "shorthand": false,
196                        "computed": false,
197                        "key": {
198                          "type": "Identifier",
199                          "name": "b",
200                          "decorators": [],
201                          "loc": {
202                            "start": {
203                              "line": 17,
204                              "column": 29
205                            },
206                            "end": {
207                              "line": 17,
208                              "column": 30
209                            }
210                          }
211                        },
212                        "value": {
213                          "type": "BooleanLiteral",
214                          "value": true,
215                          "loc": {
216                            "start": {
217                              "line": 17,
218                              "column": 32
219                            },
220                            "end": {
221                              "line": 17,
222                              "column": 36
223                            }
224                          }
225                        },
226                        "kind": "init",
227                        "loc": {
228                          "start": {
229                            "line": 17,
230                            "column": 29
231                          },
232                          "end": {
233                            "line": 17,
234                            "column": 36
235                          }
236                        }
237                      }
238                    ],
239                    "loc": {
240                      "start": {
241                        "line": 17,
242                        "column": 21
243                      },
244                      "end": {
245                        "line": 17,
246                        "column": 38
247                      }
248                    }
249                  },
250                  "loc": {
251                    "start": {
252                      "line": 17,
253                      "column": 10
254                    },
255                    "end": {
256                      "line": 17,
257                      "column": 38
258                    }
259                  }
260                },
261                "kind": "init",
262                "loc": {
263                  "start": {
264                    "line": 17,
265                    "column": 7
266                  },
267                  "end": {
268                    "line": 17,
269                    "column": 38
270                  }
271                }
272              }
273            ],
274            "loc": {
275              "start": {
276                "line": 17,
277                "column": 5
278              },
279              "end": {
280                "line": 17,
281                "column": 40
282              }
283            }
284          },
285          "init": {
286            "type": "ObjectExpression",
287            "properties": [],
288            "loc": {
289              "start": {
290                "line": 17,
291                "column": 43
292              },
293              "end": {
294                "line": 17,
295                "column": 45
296              }
297            }
298          },
299          "loc": {
300            "start": {
301              "line": 17,
302              "column": 5
303            },
304            "end": {
305              "line": 17,
306              "column": 45
307            }
308          }
309        }
310      ],
311      "kind": "var",
312      "loc": {
313        "start": {
314          "line": 17,
315          "column": 1
316        },
317        "end": {
318          "line": 17,
319          "column": 45
320        }
321      }
322    },
323    {
324      "type": "ExpressionStatement",
325      "expression": {
326        "type": "AssignmentExpression",
327        "operator": "=",
328        "left": {
329          "type": "Identifier",
330          "name": "a",
331          "decorators": [],
332          "loc": {
333            "start": {
334              "line": 18,
335              "column": 1
336            },
337            "end": {
338              "line": 18,
339              "column": 2
340            }
341          }
342        },
343        "right": {
344          "type": "ObjectExpression",
345          "properties": [],
346          "loc": {
347            "start": {
348              "line": 18,
349              "column": 5
350            },
351            "end": {
352              "line": 18,
353              "column": 7
354            }
355          }
356        },
357        "loc": {
358          "start": {
359            "line": 18,
360            "column": 1
361          },
362          "end": {
363            "line": 18,
364            "column": 7
365          }
366        }
367      },
368      "loc": {
369        "start": {
370          "line": 18,
371          "column": 1
372        },
373        "end": {
374          "line": 18,
375          "column": 8
376        }
377      }
378    }
379  ],
380  "loc": {
381    "start": {
382      "line": 1,
383      "column": 1
384    },
385    "end": {
386      "line": 18,
387      "column": 8
388    }
389  }
390}
391TypeError: Type '{ }' is not assignable to type 'number'. [objectDestructuring9.ts:18:1]
392