• 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": "ExpressionStatement",
64      "expression": {
65        "type": "AssignmentExpression",
66        "operator": "=",
67        "left": {
68          "type": "ArrayPattern",
69          "elements": [
70            {
71              "type": "ArrayPattern",
72              "elements": [
73                {
74                  "type": "Identifier",
75                  "name": "a",
76                  "decorators": [],
77                  "loc": {
78                    "start": {
79                      "line": 18,
80                      "column": 3
81                    },
82                    "end": {
83                      "line": 18,
84                      "column": 4
85                    }
86                  }
87                }
88              ],
89              "loc": {
90                "start": {
91                  "line": 18,
92                  "column": 2
93                },
94                "end": {
95                  "line": 18,
96                  "column": 5
97                }
98              }
99            }
100          ],
101          "loc": {
102            "start": {
103              "line": 18,
104              "column": 1
105            },
106            "end": {
107              "line": 18,
108              "column": 6
109            }
110          }
111        },
112        "right": {
113          "type": "ArrayExpression",
114          "elements": [
115            {
116              "type": "ArrayExpression",
117              "elements": [],
118              "loc": {
119                "start": {
120                  "line": 18,
121                  "column": 10
122                },
123                "end": {
124                  "line": 18,
125                  "column": 12
126                }
127              }
128            }
129          ],
130          "loc": {
131            "start": {
132              "line": 18,
133              "column": 9
134            },
135            "end": {
136              "line": 18,
137              "column": 13
138            }
139          }
140        },
141        "loc": {
142          "start": {
143            "line": 18,
144            "column": 1
145          },
146          "end": {
147            "line": 18,
148            "column": 13
149          }
150        }
151      },
152      "loc": {
153        "start": {
154          "line": 18,
155          "column": 1
156        },
157        "end": {
158          "line": 18,
159          "column": 14
160        }
161      }
162    }
163  ],
164  "loc": {
165    "start": {
166      "line": 1,
167      "column": 1
168    },
169    "end": {
170      "line": 18,
171      "column": 14
172    }
173  }
174}
175TypeError: Tuple type [] of length 0 has no element at index 0. [arrayDestructuring38.ts:18:2]
176