• 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": "Identifier",
72              "name": "a",
73              "decorators": [],
74              "loc": {
75                "start": {
76                  "line": 18,
77                  "column": 2
78                },
79                "end": {
80                  "line": 18,
81                  "column": 3
82                }
83              }
84            }
85          ],
86          "loc": {
87            "start": {
88              "line": 18,
89              "column": 1
90            },
91            "end": {
92              "line": 18,
93              "column": 4
94            }
95          }
96        },
97        "right": {
98          "type": "ArrayExpression",
99          "elements": [],
100          "loc": {
101            "start": {
102              "line": 18,
103              "column": 7
104            },
105            "end": {
106              "line": 18,
107              "column": 9
108            }
109          }
110        },
111        "loc": {
112          "start": {
113            "line": 18,
114            "column": 1
115          },
116          "end": {
117            "line": 18,
118            "column": 9
119          }
120        }
121      },
122      "loc": {
123        "start": {
124          "line": 18,
125          "column": 1
126        },
127        "end": {
128          "line": 18,
129          "column": 10
130        }
131      }
132    }
133  ],
134  "loc": {
135    "start": {
136      "line": 1,
137      "column": 1
138    },
139    "end": {
140      "line": 18,
141      "column": 10
142    }
143  }
144}
145TypeError: Tuple type [] of length 0 has no element at index 0. [arrayDestructuring29.ts:18:1]
146