• 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            "loc": {
29              "start": {
30                "line": 17,
31                "column": 5
32              },
33              "end": {
34                "line": 17,
35                "column": 8
36              }
37            }
38          },
39          "init": {
40            "type": "ArrayExpression",
41            "elements": [],
42            "loc": {
43              "start": {
44                "line": 17,
45                "column": 11
46              },
47              "end": {
48                "line": 17,
49                "column": 13
50              }
51            }
52          },
53          "loc": {
54            "start": {
55              "line": 17,
56              "column": 5
57            },
58            "end": {
59              "line": 17,
60              "column": 13
61            }
62          }
63        }
64      ],
65      "kind": "var",
66      "loc": {
67        "start": {
68          "line": 17,
69          "column": 1
70        },
71        "end": {
72          "line": 17,
73          "column": 14
74        }
75      }
76    }
77  ],
78  "loc": {
79    "start": {
80      "line": 1,
81      "column": 1
82    },
83    "end": {
84      "line": 17,
85      "column": 14
86    }
87  }
88}
89TypeError: Tuple type [] of length 0 has no element at index 0. [arrayDestructuring1.ts:17:5]
90