• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "ExpressionStatement",
6      "expression": {
7        "type": "AssignmentExpression",
8        "operator": "=",
9        "left": {
10          "type": "Identifier",
11          "name": "a",
12          "decorators": [],
13          "loc": {
14            "start": {
15              "line": 17,
16              "column": 1
17            },
18            "end": {
19              "line": 17,
20              "column": 2
21            }
22          }
23        },
24        "right": {
25          "type": "NumberLiteral",
26          "value": 5,
27          "loc": {
28            "start": {
29              "line": 17,
30              "column": 5
31            },
32            "end": {
33              "line": 17,
34              "column": 6
35            }
36          }
37        },
38        "loc": {
39          "start": {
40            "line": 17,
41            "column": 1
42          },
43          "end": {
44            "line": 17,
45            "column": 6
46          }
47        }
48      },
49      "loc": {
50        "start": {
51          "line": 17,
52          "column": 1
53        },
54        "end": {
55          "line": 17,
56          "column": 7
57        }
58      }
59    },
60    {
61      "type": "VariableDeclaration",
62      "declarations": [
63        {
64          "type": "VariableDeclarator",
65          "id": {
66            "type": "Identifier",
67            "name": "a",
68            "typeAnnotation": {
69              "type": "TSNumberKeyword",
70              "loc": {
71                "start": {
72                  "line": 18,
73                  "column": 8
74                },
75                "end": {
76                  "line": 18,
77                  "column": 14
78                }
79              }
80            },
81            "decorators": [],
82            "loc": {
83              "start": {
84                "line": 18,
85                "column": 5
86              },
87              "end": {
88                "line": 18,
89                "column": 6
90              }
91            }
92          },
93          "init": null,
94          "loc": {
95            "start": {
96              "line": 18,
97              "column": 5
98            },
99            "end": {
100              "line": 18,
101              "column": 6
102            }
103          }
104        }
105      ],
106      "kind": "var",
107      "loc": {
108        "start": {
109          "line": 18,
110          "column": 1
111        },
112        "end": {
113          "line": 18,
114          "column": 15
115        }
116      }
117    },
118    {
119      "type": "VariableDeclaration",
120      "declarations": [
121        {
122          "type": "VariableDeclarator",
123          "id": {
124            "type": "Identifier",
125            "name": "b",
126            "typeAnnotation": {
127              "type": "TSTypeQuery",
128              "exprName": {
129                "type": "Identifier",
130                "name": "a",
131                "decorators": [],
132                "loc": {
133                  "start": {
134                    "line": 19,
135                    "column": 15
136                  },
137                  "end": {
138                    "line": 19,
139                    "column": 16
140                  }
141                }
142              },
143              "loc": {
144                "start": {
145                  "line": 19,
146                  "column": 8
147                },
148                "end": {
149                  "line": 19,
150                  "column": 16
151                }
152              }
153            },
154            "decorators": [],
155            "loc": {
156              "start": {
157                "line": 19,
158                "column": 5
159              },
160              "end": {
161                "line": 19,
162                "column": 6
163              }
164            }
165          },
166          "init": null,
167          "loc": {
168            "start": {
169              "line": 19,
170              "column": 5
171            },
172            "end": {
173              "line": 19,
174              "column": 6
175            }
176          }
177        }
178      ],
179      "kind": "var",
180      "loc": {
181        "start": {
182          "line": 19,
183          "column": 1
184        },
185        "end": {
186          "line": 19,
187          "column": 17
188        }
189      }
190    },
191    {
192      "type": "ExpressionStatement",
193      "expression": {
194        "type": "AssignmentExpression",
195        "operator": "=",
196        "left": {
197          "type": "Identifier",
198          "name": "b",
199          "decorators": [],
200          "loc": {
201            "start": {
202              "line": 20,
203              "column": 1
204            },
205            "end": {
206              "line": 20,
207              "column": 2
208            }
209          }
210        },
211        "right": {
212          "type": "NumberLiteral",
213          "value": 12,
214          "loc": {
215            "start": {
216              "line": 20,
217              "column": 5
218            },
219            "end": {
220              "line": 20,
221              "column": 7
222            }
223          }
224        },
225        "loc": {
226          "start": {
227            "line": 20,
228            "column": 1
229          },
230          "end": {
231            "line": 20,
232            "column": 7
233          }
234        }
235      },
236      "loc": {
237        "start": {
238          "line": 20,
239          "column": 1
240        },
241        "end": {
242          "line": 20,
243          "column": 8
244        }
245      }
246    },
247    {
248      "type": "ExpressionStatement",
249      "expression": {
250        "type": "AssignmentExpression",
251        "operator": "=",
252        "left": {
253          "type": "Identifier",
254          "name": "foo",
255          "decorators": [],
256          "loc": {
257            "start": {
258              "line": 21,
259              "column": 1
260            },
261            "end": {
262              "line": 21,
263              "column": 4
264            }
265          }
266        },
267        "right": {
268          "type": "NumberLiteral",
269          "value": 4,
270          "loc": {
271            "start": {
272              "line": 21,
273              "column": 7
274            },
275            "end": {
276              "line": 21,
277              "column": 8
278            }
279          }
280        },
281        "loc": {
282          "start": {
283            "line": 21,
284            "column": 1
285          },
286          "end": {
287            "line": 21,
288            "column": 8
289          }
290        }
291      },
292      "loc": {
293        "start": {
294          "line": 21,
295          "column": 1
296        },
297        "end": {
298          "line": 21,
299          "column": 9
300        }
301      }
302    }
303  ],
304  "loc": {
305    "start": {
306      "line": 1,
307      "column": 1
308    },
309    "end": {
310      "line": 21,
311      "column": 9
312    }
313  }
314}
315TypeError: Cannot find name foo [identifierWithoutDeclaration.ts:21:1]
316