• 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          "loc": {
177            "start": {
178              "line": 18,
179              "column": 2
180            },
181            "end": {
182              "line": 18,
183              "column": 5
184            }
185          }
186        },
187        "right": {
188          "type": "Identifier",
189          "name": "b",
190          "decorators": [],
191          "loc": {
192            "start": {
193              "line": 18,
194              "column": 8
195            },
196            "end": {
197              "line": 18,
198              "column": 9
199            }
200          }
201        },
202        "loc": {
203          "start": {
204            "line": 18,
205            "column": 1
206          },
207          "end": {
208            "line": 18,
209            "column": 10
210          }
211        }
212      },
213      "loc": {
214        "start": {
215          "line": 18,
216          "column": 1
217        },
218        "end": {
219          "line": 18,
220          "column": 10
221        }
222      }
223    }
224  ],
225  "loc": {
226    "start": {
227      "line": 1,
228      "column": 1
229    },
230    "end": {
231      "line": 20,
232      "column": 1
233    }
234  }
235}
236TypeError: Property a does not exist on type string. [objectDestructuring34.ts:18:2]
237