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