• 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            "decorators": [],
13            "loc": {
14              "start": {
15                "line": 16,
16                "column": 5
17              },
18              "end": {
19                "line": 16,
20                "column": 6
21              }
22            }
23          },
24          "init": {
25            "type": "ObjectExpression",
26            "properties": [],
27            "loc": {
28              "start": {
29                "line": 16,
30                "column": 9
31              },
32              "end": {
33                "line": 16,
34                "column": 11
35              }
36            }
37          },
38          "loc": {
39            "start": {
40              "line": 16,
41              "column": 5
42            },
43            "end": {
44              "line": 16,
45              "column": 11
46            }
47          }
48        }
49      ],
50      "kind": "var",
51      "loc": {
52        "start": {
53          "line": 16,
54          "column": 1
55        },
56        "end": {
57          "line": 16,
58          "column": 12
59        }
60      }
61    },
62    {
63      "type": "VariableDeclaration",
64      "declarations": [
65        {
66          "type": "VariableDeclarator",
67          "id": {
68            "type": "Identifier",
69            "name": "b",
70            "typeAnnotation": {
71              "type": "TSNumberKeyword",
72              "loc": {
73                "start": {
74                  "line": 17,
75                  "column": 8
76                },
77                "end": {
78                  "line": 17,
79                  "column": 14
80                }
81              }
82            },
83            "decorators": [],
84            "loc": {
85              "start": {
86                "line": 17,
87                "column": 5
88              },
89              "end": {
90                "line": 17,
91                "column": 6
92              }
93            }
94          },
95          "init": null,
96          "loc": {
97            "start": {
98              "line": 17,
99              "column": 5
100            },
101            "end": {
102              "line": 17,
103              "column": 6
104            }
105          }
106        }
107      ],
108      "kind": "var",
109      "loc": {
110        "start": {
111          "line": 17,
112          "column": 1
113        },
114        "end": {
115          "line": 17,
116          "column": 15
117        }
118      }
119    },
120    {
121      "type": "VariableDeclaration",
122      "declarations": [
123        {
124          "type": "VariableDeclarator",
125          "id": {
126            "type": "Identifier",
127            "name": "c",
128            "typeAnnotation": {
129              "type": "TSStringKeyword",
130              "loc": {
131                "start": {
132                  "line": 18,
133                  "column": 8
134                },
135                "end": {
136                  "line": 18,
137                  "column": 14
138                }
139              }
140            },
141            "decorators": [],
142            "loc": {
143              "start": {
144                "line": 18,
145                "column": 5
146              },
147              "end": {
148                "line": 18,
149                "column": 6
150              }
151            }
152          },
153          "init": null,
154          "loc": {
155            "start": {
156              "line": 18,
157              "column": 5
158            },
159            "end": {
160              "line": 18,
161              "column": 6
162            }
163          }
164        }
165      ],
166      "kind": "var",
167      "loc": {
168        "start": {
169          "line": 18,
170          "column": 1
171        },
172        "end": {
173          "line": 18,
174          "column": 15
175        }
176      }
177    },
178    {
179      "type": "ExpressionStatement",
180      "expression": {
181        "type": "AssignmentExpression",
182        "operator": "=",
183        "left": {
184          "type": "ObjectPattern",
185          "properties": [
186            {
187              "type": "Property",
188              "method": false,
189              "shorthand": false,
190              "computed": false,
191              "key": {
192                "type": "Identifier",
193                "name": "a",
194                "decorators": [],
195                "loc": {
196                  "start": {
197                    "line": 19,
198                    "column": 3
199                  },
200                  "end": {
201                    "line": 19,
202                    "column": 4
203                  }
204                }
205              },
206              "value": {
207                "type": "ObjectPattern",
208                "properties": [
209                  {
210                    "type": "Property",
211                    "method": false,
212                    "shorthand": true,
213                    "computed": false,
214                    "key": {
215                      "type": "Identifier",
216                      "name": "c",
217                      "decorators": [],
218                      "loc": {
219                        "start": {
220                          "line": 19,
221                          "column": 8
222                        },
223                        "end": {
224                          "line": 19,
225                          "column": 9
226                        }
227                      }
228                    },
229                    "value": {
230                      "type": "Identifier",
231                      "name": "c",
232                      "decorators": [],
233                      "loc": {
234                        "start": {
235                          "line": 19,
236                          "column": 8
237                        },
238                        "end": {
239                          "line": 19,
240                          "column": 9
241                        }
242                      }
243                    },
244                    "kind": "init",
245                    "loc": {
246                      "start": {
247                        "line": 19,
248                        "column": 8
249                      },
250                      "end": {
251                        "line": 19,
252                        "column": 9
253                      }
254                    }
255                  }
256                ],
257                "loc": {
258                  "start": {
259                    "line": 19,
260                    "column": 7
261                  },
262                  "end": {
263                    "line": 19,
264                    "column": 10
265                  }
266                }
267              },
268              "kind": "init",
269              "loc": {
270                "start": {
271                  "line": 19,
272                  "column": 3
273                },
274                "end": {
275                  "line": 19,
276                  "column": 10
277                }
278              }
279            }
280          ],
281          "loc": {
282            "start": {
283              "line": 19,
284              "column": 2
285            },
286            "end": {
287              "line": 19,
288              "column": 11
289            }
290          }
291        },
292        "right": {
293          "type": "ObjectExpression",
294          "properties": [
295            {
296              "type": "Property",
297              "method": false,
298              "shorthand": false,
299              "computed": false,
300              "key": {
301                "type": "Identifier",
302                "name": "a",
303                "decorators": [],
304                "loc": {
305                  "start": {
306                    "line": 19,
307                    "column": 15
308                  },
309                  "end": {
310                    "line": 19,
311                    "column": 16
312                  }
313                }
314              },
315              "value": {
316                "type": "ObjectExpression",
317                "properties": [
318                  {
319                    "type": "Property",
320                    "method": false,
321                    "shorthand": false,
322                    "computed": false,
323                    "key": {
324                      "type": "Identifier",
325                      "name": "c",
326                      "decorators": [],
327                      "loc": {
328                        "start": {
329                          "line": 19,
330                          "column": 20
331                        },
332                        "end": {
333                          "line": 19,
334                          "column": 21
335                        }
336                      }
337                    },
338                    "value": {
339                      "type": "Identifier",
340                      "name": "b",
341                      "decorators": [],
342                      "loc": {
343                        "start": {
344                          "line": 19,
345                          "column": 24
346                        },
347                        "end": {
348                          "line": 19,
349                          "column": 25
350                        }
351                      }
352                    },
353                    "kind": "init",
354                    "loc": {
355                      "start": {
356                        "line": 19,
357                        "column": 20
358                      },
359                      "end": {
360                        "line": 19,
361                        "column": 25
362                      }
363                    }
364                  }
365                ],
366                "loc": {
367                  "start": {
368                    "line": 19,
369                    "column": 19
370                  },
371                  "end": {
372                    "line": 19,
373                    "column": 26
374                  }
375                }
376              },
377              "kind": "init",
378              "loc": {
379                "start": {
380                  "line": 19,
381                  "column": 15
382                },
383                "end": {
384                  "line": 19,
385                  "column": 26
386                }
387              }
388            }
389          ],
390          "loc": {
391            "start": {
392              "line": 19,
393              "column": 14
394            },
395            "end": {
396              "line": 19,
397              "column": 27
398            }
399          }
400        },
401        "loc": {
402          "start": {
403            "line": 19,
404            "column": 1
405          },
406          "end": {
407            "line": 19,
408            "column": 28
409          }
410        }
411      },
412      "loc": {
413        "start": {
414          "line": 19,
415          "column": 1
416        },
417        "end": {
418          "line": 19,
419          "column": 28
420        }
421      }
422    }
423  ],
424  "loc": {
425    "start": {
426      "line": 1,
427      "column": 1
428    },
429    "end": {
430      "line": 21,
431      "column": 1
432    }
433  }
434}
435TypeError: Type 'number' is not assignable to type 'string'. [objectDestructuring38.ts:19:8]
436