• 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": "a",
12            "typeAnnotation": {
13              "type": "TSNumberKeyword",
14              "loc": {
15                "start": {
16                  "line": 17,
17                  "column": 7
18                },
19                "end": {
20                  "line": 17,
21                  "column": 13
22                }
23              }
24            },
25            "decorators": [],
26            "loc": {
27              "start": {
28                "line": 17,
29                "column": 5
30              },
31              "end": {
32                "line": 17,
33                "column": 6
34              }
35            }
36          },
37          "init": null,
38          "loc": {
39            "start": {
40              "line": 17,
41              "column": 5
42            },
43            "end": {
44              "line": 17,
45              "column": 6
46            }
47          }
48        }
49      ],
50      "kind": "var",
51      "loc": {
52        "start": {
53          "line": 17,
54          "column": 1
55        },
56        "end": {
57          "line": 17,
58          "column": 14
59        }
60      }
61    },
62    {
63      "type": "VariableDeclaration",
64      "declarations": [
65        {
66          "type": "VariableDeclarator",
67          "id": {
68            "type": "Identifier",
69            "name": "b",
70            "typeAnnotation": {
71              "type": "TSNumberKeyword",
72              "loc": {
73                "start": {
74                  "line": 18,
75                  "column": 8
76                },
77                "end": {
78                  "line": 18,
79                  "column": 14
80                }
81              }
82            },
83            "decorators": [],
84            "loc": {
85              "start": {
86                "line": 18,
87                "column": 5
88              },
89              "end": {
90                "line": 18,
91                "column": 6
92              }
93            }
94          },
95          "init": null,
96          "loc": {
97            "start": {
98              "line": 18,
99              "column": 5
100            },
101            "end": {
102              "line": 18,
103              "column": 6
104            }
105          }
106        }
107      ],
108      "kind": "var",
109      "loc": {
110        "start": {
111          "line": 18,
112          "column": 1
113        },
114        "end": {
115          "line": 18,
116          "column": 15
117        }
118      }
119    },
120    {
121      "type": "ExpressionStatement",
122      "expression": {
123        "type": "AssignmentExpression",
124        "operator": "=",
125        "left": {
126          "type": "ArrayPattern",
127          "elements": [
128            {
129              "type": "ArrayPattern",
130              "elements": [
131                {
132                  "type": "AssignmentPattern",
133                  "left": {
134                    "type": "Identifier",
135                    "name": "a",
136                    "decorators": [],
137                    "loc": {
138                      "start": {
139                        "line": 19,
140                        "column": 3
141                      },
142                      "end": {
143                        "line": 19,
144                        "column": 4
145                      }
146                    }
147                  },
148                  "right": {
149                    "type": "NumberLiteral",
150                    "value": 5,
151                    "loc": {
152                      "start": {
153                        "line": 19,
154                        "column": 7
155                      },
156                      "end": {
157                        "line": 19,
158                        "column": 8
159                      }
160                    }
161                  },
162                  "loc": {
163                    "start": {
164                      "line": 19,
165                      "column": 3
166                    },
167                    "end": {
168                      "line": 19,
169                      "column": 8
170                    }
171                  }
172                },
173                {
174                  "type": "Identifier",
175                  "name": "b",
176                  "decorators": [],
177                  "loc": {
178                    "start": {
179                      "line": 19,
180                      "column": 10
181                    },
182                    "end": {
183                      "line": 19,
184                      "column": 11
185                    }
186                  }
187                }
188              ],
189              "loc": {
190                "start": {
191                  "line": 19,
192                  "column": 2
193                },
194                "end": {
195                  "line": 19,
196                  "column": 12
197                }
198              }
199            }
200          ],
201          "loc": {
202            "start": {
203              "line": 19,
204              "column": 1
205            },
206            "end": {
207              "line": 19,
208              "column": 13
209            }
210          }
211        },
212        "right": {
213          "type": "ArrayExpression",
214          "elements": [
215            {
216              "type": "ArrayExpression",
217              "elements": [],
218              "loc": {
219                "start": {
220                  "line": 19,
221                  "column": 17
222                },
223                "end": {
224                  "line": 19,
225                  "column": 19
226                }
227              }
228            }
229          ],
230          "loc": {
231            "start": {
232              "line": 19,
233              "column": 16
234            },
235            "end": {
236              "line": 19,
237              "column": 20
238            }
239          }
240        },
241        "loc": {
242          "start": {
243            "line": 19,
244            "column": 1
245          },
246          "end": {
247            "line": 19,
248            "column": 20
249          }
250        }
251      },
252      "loc": {
253        "start": {
254          "line": 19,
255          "column": 1
256        },
257        "end": {
258          "line": 19,
259          "column": 21
260        }
261      }
262    }
263  ],
264  "loc": {
265    "start": {
266      "line": 1,
267      "column": 1
268    },
269    "end": {
270      "line": 19,
271      "column": 21
272    }
273  }
274}
275TypeError: Tuple type [] of length 0 has no element at index 1. [arrayDestructuring39.ts:19:2]
276