• 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                  "type": "TSStringKeyword",
30                  "loc": {
31                    "start": {
32                      "line": 17,
33                      "column": 17
34                    },
35                    "end": {
36                      "line": 17,
37                      "column": 24
38                    }
39                  }
40                },
41                {
42                  "type": "TSNumberKeyword",
43                  "loc": {
44                    "start": {
45                      "line": 17,
46                      "column": 25
47                    },
48                    "end": {
49                      "line": 17,
50                      "column": 32
51                    }
52                  }
53                }
54              ],
55              "loc": {
56                "start": {
57                  "line": 17,
58                  "column": 8
59                },
60                "end": {
61                  "line": 17,
62                  "column": 32
63                }
64              }
65            },
66            "decorators": [],
67            "loc": {
68              "start": {
69                "line": 17,
70                "column": 5
71              },
72              "end": {
73                "line": 17,
74                "column": 6
75              }
76            }
77          },
78          "init": null,
79          "loc": {
80            "start": {
81              "line": 17,
82              "column": 5
83            },
84            "end": {
85              "line": 17,
86              "column": 6
87            }
88          }
89        }
90      ],
91      "kind": "var",
92      "loc": {
93        "start": {
94          "line": 17,
95          "column": 1
96        },
97        "end": {
98          "line": 17,
99          "column": 33
100        }
101      }
102    },
103    {
104      "type": "VariableDeclaration",
105      "declarations": [
106        {
107          "type": "VariableDeclarator",
108          "id": {
109            "type": "ArrayPattern",
110            "elements": [
111              {
112                "type": "Identifier",
113                "name": "b",
114                "decorators": [],
115                "loc": {
116                  "start": {
117                    "line": 18,
118                    "column": 6
119                  },
120                  "end": {
121                    "line": 18,
122                    "column": 7
123                  }
124                }
125              },
126              {
127                "type": "Identifier",
128                "name": "c",
129                "decorators": [],
130                "loc": {
131                  "start": {
132                    "line": 18,
133                    "column": 9
134                  },
135                  "end": {
136                    "line": 18,
137                    "column": 10
138                  }
139                }
140              }
141            ],
142            "loc": {
143              "start": {
144                "line": 18,
145                "column": 5
146              },
147              "end": {
148                "line": 18,
149                "column": 11
150              }
151            }
152          },
153          "init": {
154            "type": "Identifier",
155            "name": "a",
156            "decorators": [],
157            "loc": {
158              "start": {
159                "line": 18,
160                "column": 14
161              },
162              "end": {
163                "line": 18,
164                "column": 15
165              }
166            }
167          },
168          "loc": {
169            "start": {
170              "line": 18,
171              "column": 5
172            },
173            "end": {
174              "line": 18,
175              "column": 15
176            }
177          }
178        }
179      ],
180      "kind": "var",
181      "loc": {
182        "start": {
183          "line": 18,
184          "column": 1
185        },
186        "end": {
187          "line": 18,
188          "column": 16
189        }
190      }
191    },
192    {
193      "type": "ExpressionStatement",
194      "expression": {
195        "type": "AssignmentExpression",
196        "operator": "=",
197        "left": {
198          "type": "Identifier",
199          "name": "b",
200          "decorators": [],
201          "loc": {
202            "start": {
203              "line": 19,
204              "column": 1
205            },
206            "end": {
207              "line": 19,
208              "column": 2
209            }
210          }
211        },
212        "right": {
213          "type": "ObjectExpression",
214          "properties": [],
215          "loc": {
216            "start": {
217              "line": 19,
218              "column": 5
219            },
220            "end": {
221              "line": 19,
222              "column": 7
223            }
224          }
225        },
226        "loc": {
227          "start": {
228            "line": 19,
229            "column": 1
230          },
231          "end": {
232            "line": 19,
233            "column": 7
234          }
235        }
236      },
237      "loc": {
238        "start": {
239          "line": 19,
240          "column": 1
241        },
242        "end": {
243          "line": 19,
244          "column": 7
245        }
246      }
247    }
248  ],
249  "loc": {
250    "start": {
251      "line": 1,
252      "column": 1
253    },
254    "end": {
255      "line": 19,
256      "column": 7
257    }
258  }
259}
260TypeError: Type '{ }' is not assignable to type 'number'. [arrayDestructuring13.ts:19:1]
261