• 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": "RestElement",
29                "argument": {
30                  "type": "ArrayPattern",
31                  "elements": [
32                    {
33                      "type": "Identifier",
34                      "name": "b",
35                      "decorators": [],
36                      "loc": {
37                        "start": {
38                          "line": 17,
39                          "column": 13
40                        },
41                        "end": {
42                          "line": 17,
43                          "column": 14
44                        }
45                      }
46                    },
47                    {
48                      "type": "Identifier",
49                      "name": "c",
50                      "decorators": [],
51                      "loc": {
52                        "start": {
53                          "line": 17,
54                          "column": 16
55                        },
56                        "end": {
57                          "line": 17,
58                          "column": 17
59                        }
60                      }
61                    }
62                  ],
63                  "loc": {
64                    "start": {
65                      "line": 17,
66                      "column": 12
67                    },
68                    "end": {
69                      "line": 17,
70                      "column": 18
71                    }
72                  }
73                },
74                "loc": {
75                  "start": {
76                    "line": 17,
77                    "column": 9
78                  },
79                  "end": {
80                    "line": 17,
81                    "column": 18
82                  }
83                }
84              }
85            ],
86            "loc": {
87              "start": {
88                "line": 17,
89                "column": 5
90              },
91              "end": {
92                "line": 17,
93                "column": 19
94              }
95            }
96          },
97          "init": {
98            "type": "ArrayExpression",
99            "elements": [
100              {
101                "type": "NumberLiteral",
102                "value": 1,
103                "loc": {
104                  "start": {
105                    "line": 17,
106                    "column": 23
107                  },
108                  "end": {
109                    "line": 17,
110                    "column": 24
111                  }
112                }
113              },
114              {
115                "type": "NumberLiteral",
116                "value": 2,
117                "loc": {
118                  "start": {
119                    "line": 17,
120                    "column": 26
121                  },
122                  "end": {
123                    "line": 17,
124                    "column": 27
125                  }
126                }
127              }
128            ],
129            "loc": {
130              "start": {
131                "line": 17,
132                "column": 22
133              },
134              "end": {
135                "line": 17,
136                "column": 28
137              }
138            }
139          },
140          "loc": {
141            "start": {
142              "line": 17,
143              "column": 5
144            },
145            "end": {
146              "line": 17,
147              "column": 28
148            }
149          }
150        }
151      ],
152      "kind": "var",
153      "loc": {
154        "start": {
155          "line": 17,
156          "column": 1
157        },
158        "end": {
159          "line": 17,
160          "column": 29
161        }
162      }
163    }
164  ],
165  "loc": {
166    "start": {
167      "line": 1,
168      "column": 1
169    },
170    "end": {
171      "line": 17,
172      "column": 29
173    }
174  }
175}
176TypeError: Tuple type [number] of length 1 has no element at index 1. [arrayDestructuring25.ts:17:12]
177