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