• 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": "TSNumberKeyword",
14              "loc": {
15                "start": {
16                  "line": 16,
17                  "column": 8
18                },
19                "end": {
20                  "line": 16,
21                  "column": 14
22                }
23              }
24            },
25            "decorators": [],
26            "loc": {
27              "start": {
28                "line": 16,
29                "column": 5
30              },
31              "end": {
32                "line": 16,
33                "column": 6
34              }
35            }
36          },
37          "init": null,
38          "loc": {
39            "start": {
40              "line": 16,
41              "column": 5
42            },
43            "end": {
44              "line": 16,
45              "column": 6
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": 15
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": "TSStringKeyword",
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": "ExpressionStatement",
122      "expression": {
123        "type": "AssignmentExpression",
124        "operator": "=",
125        "left": {
126          "type": "ObjectPattern",
127          "properties": [
128            {
129              "type": "Property",
130              "method": false,
131              "shorthand": true,
132              "computed": false,
133              "key": {
134                "type": "Identifier",
135                "name": "a",
136                "decorators": [],
137                "loc": {
138                  "start": {
139                    "line": 18,
140                    "column": 3
141                  },
142                  "end": {
143                    "line": 18,
144                    "column": 4
145                  }
146                }
147              },
148              "value": {
149                "type": "Identifier",
150                "name": "a",
151                "decorators": [],
152                "loc": {
153                  "start": {
154                    "line": 18,
155                    "column": 3
156                  },
157                  "end": {
158                    "line": 18,
159                    "column": 4
160                  }
161                }
162              },
163              "kind": "init",
164              "loc": {
165                "start": {
166                  "line": 18,
167                  "column": 3
168                },
169                "end": {
170                  "line": 18,
171                  "column": 4
172                }
173              }
174            },
175            {
176              "type": "Property",
177              "method": false,
178              "shorthand": true,
179              "computed": false,
180              "key": {
181                "type": "Identifier",
182                "name": "b",
183                "decorators": [],
184                "loc": {
185                  "start": {
186                    "line": 18,
187                    "column": 6
188                  },
189                  "end": {
190                    "line": 18,
191                    "column": 7
192                  }
193                }
194              },
195              "value": {
196                "type": "Identifier",
197                "name": "b",
198                "decorators": [],
199                "loc": {
200                  "start": {
201                    "line": 18,
202                    "column": 6
203                  },
204                  "end": {
205                    "line": 18,
206                    "column": 7
207                  }
208                }
209              },
210              "kind": "init",
211              "loc": {
212                "start": {
213                  "line": 18,
214                  "column": 6
215                },
216                "end": {
217                  "line": 18,
218                  "column": 7
219                }
220              }
221            }
222          ],
223          "loc": {
224            "start": {
225              "line": 18,
226              "column": 2
227            },
228            "end": {
229              "line": 18,
230              "column": 8
231            }
232          }
233        },
234        "right": {
235          "type": "ObjectExpression",
236          "properties": [
237            {
238              "type": "Property",
239              "method": false,
240              "shorthand": false,
241              "computed": false,
242              "key": {
243                "type": "Identifier",
244                "name": "a",
245                "decorators": [],
246                "loc": {
247                  "start": {
248                    "line": 18,
249                    "column": 12
250                  },
251                  "end": {
252                    "line": 18,
253                    "column": 13
254                  }
255                }
256              },
257              "value": {
258                "type": "NumberLiteral",
259                "value": 5,
260                "loc": {
261                  "start": {
262                    "line": 18,
263                    "column": 16
264                  },
265                  "end": {
266                    "line": 18,
267                    "column": 17
268                  }
269                }
270              },
271              "kind": "init",
272              "loc": {
273                "start": {
274                  "line": 18,
275                  "column": 12
276                },
277                "end": {
278                  "line": 18,
279                  "column": 17
280                }
281              }
282            }
283          ],
284          "loc": {
285            "start": {
286              "line": 18,
287              "column": 11
288            },
289            "end": {
290              "line": 18,
291              "column": 18
292            }
293          }
294        },
295        "loc": {
296          "start": {
297            "line": 18,
298            "column": 1
299          },
300          "end": {
301            "line": 18,
302            "column": 19
303          }
304        }
305      },
306      "loc": {
307        "start": {
308          "line": 18,
309          "column": 1
310        },
311        "end": {
312          "line": 18,
313          "column": 19
314        }
315      }
316    }
317  ],
318  "loc": {
319    "start": {
320      "line": 1,
321      "column": 1
322    },
323    "end": {
324      "line": 20,
325      "column": 1
326    }
327  }
328}
329TypeError: Property b does not exist on type { a: number; }. [objectDestructuring40.ts:18:2]
330