• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "FunctionDeclaration",
6      "function": {
7        "type": "ScriptFunction",
8        "id": {
9          "type": "Identifier",
10          "name": "test",
11          "decorators": [],
12          "loc": {
13            "start": {
14              "line": 17,
15              "column": 10
16            },
17            "end": {
18              "line": 17,
19              "column": 14
20            }
21          }
22        },
23        "generator": false,
24        "async": false,
25        "expression": false,
26        "params": [
27          {
28            "type": "Identifier",
29            "name": "x",
30            "typeAnnotation": {
31              "type": "TSBooleanKeyword",
32              "loc": {
33                "start": {
34                  "line": 17,
35                  "column": 18
36                },
37                "end": {
38                  "line": 17,
39                  "column": 25
40                }
41              }
42            },
43            "decorators": [],
44            "loc": {
45              "start": {
46                "line": 17,
47                "column": 15
48              },
49              "end": {
50                "line": 17,
51                "column": 16
52              }
53            }
54          }
55        ],
56        "returnType": {
57          "type": "TSBooleanKeyword",
58          "loc": {
59            "start": {
60              "line": 17,
61              "column": 28
62            },
63            "end": {
64              "line": 17,
65              "column": 35
66            }
67          }
68        },
69        "body": {
70          "type": "BlockStatement",
71          "statements": [
72            {
73              "type": "ReturnStatement",
74              "argument": {
75                "type": "Identifier",
76                "name": "x",
77                "decorators": [],
78                "loc": {
79                  "start": {
80                    "line": 17,
81                    "column": 45
82                  },
83                  "end": {
84                    "line": 17,
85                    "column": 46
86                  }
87                }
88              },
89              "loc": {
90                "start": {
91                  "line": 17,
92                  "column": 38
93                },
94                "end": {
95                  "line": 17,
96                  "column": 47
97                }
98              }
99            }
100          ],
101          "loc": {
102            "start": {
103              "line": 17,
104              "column": 36
105            },
106            "end": {
107              "line": 17,
108              "column": 49
109            }
110          }
111        },
112        "loc": {
113          "start": {
114            "line": 17,
115            "column": 1
116          },
117          "end": {
118            "line": 17,
119            "column": 49
120          }
121        }
122      },
123      "loc": {
124        "start": {
125          "line": 17,
126          "column": 1
127        },
128        "end": {
129          "line": 17,
130          "column": 49
131        }
132      }
133    },
134    {
135      "type": "VariableDeclaration",
136      "declarations": [
137        {
138          "type": "VariableDeclarator",
139          "id": {
140            "type": "Identifier",
141            "name": "state",
142            "decorators": [],
143            "loc": {
144              "start": {
145                "line": 19,
146                "column": 5
147              },
148              "end": {
149                "line": 19,
150                "column": 10
151              }
152            }
153          },
154          "init": {
155            "type": "BooleanLiteral",
156            "value": true,
157            "loc": {
158              "start": {
159                "line": 19,
160                "column": 13
161              },
162              "end": {
163                "line": 19,
164                "column": 17
165              }
166            }
167          },
168          "loc": {
169            "start": {
170              "line": 19,
171              "column": 5
172            },
173            "end": {
174              "line": 19,
175              "column": 17
176            }
177          }
178        }
179      ],
180      "kind": "let",
181      "loc": {
182        "start": {
183          "line": 19,
184          "column": 1
185        },
186        "end": {
187          "line": 19,
188          "column": 18
189        }
190      }
191    },
192    {
193      "type": "IfStatement",
194      "test": {
195        "type": "Identifier",
196        "name": "state",
197        "decorators": [],
198        "loc": {
199          "start": {
200            "line": 21,
201            "column": 5
202          },
203          "end": {
204            "line": 21,
205            "column": 10
206          }
207        }
208      },
209      "consequent": {
210        "type": "BlockStatement",
211        "statements": [
212          {
213            "type": "ExpressionStatement",
214            "expression": {
215              "type": "CallExpression",
216              "callee": {
217                "type": "Identifier",
218                "name": "test",
219                "decorators": [],
220                "loc": {
221                  "start": {
222                    "line": 22,
223                    "column": 3
224                  },
225                  "end": {
226                    "line": 22,
227                    "column": 7
228                  }
229                }
230              },
231              "arguments": [
232                {
233                  "type": "LogicalExpression",
234                  "operator": "&&",
235                  "left": {
236                    "type": "TSAsExpression",
237                    "expression": {
238                      "type": "Identifier",
239                      "name": "state",
240                      "decorators": [],
241                      "loc": {
242                        "start": {
243                          "line": 22,
244                          "column": 8
245                        },
246                        "end": {
247                          "line": 22,
248                          "column": 13
249                        }
250                      }
251                    },
252                    "typeAnnotation": {
253                      "type": "TSAnyKeyword",
254                      "loc": {
255                        "start": {
256                          "line": 22,
257                          "column": 17
258                        },
259                        "end": {
260                          "line": 22,
261                          "column": 20
262                        }
263                      }
264                    },
265                    "loc": {
266                      "start": {
267                        "line": 22,
268                        "column": 8
269                      },
270                      "end": {
271                        "line": 22,
272                        "column": 23
273                      }
274                    }
275                  },
276                  "right": {
277                    "type": "Identifier",
278                    "name": "state",
279                    "decorators": [],
280                    "loc": {
281                      "start": {
282                        "line": 22,
283                        "column": 24
284                      },
285                      "end": {
286                        "line": 22,
287                        "column": 29
288                      }
289                    }
290                  },
291                  "loc": {
292                    "start": {
293                      "line": 22,
294                      "column": 8
295                    },
296                    "end": {
297                      "line": 22,
298                      "column": 29
299                    }
300                  }
301                }
302              ],
303              "optional": false,
304              "loc": {
305                "start": {
306                  "line": 22,
307                  "column": 3
308                },
309                "end": {
310                  "line": 22,
311                  "column": 30
312                }
313              }
314            },
315            "loc": {
316              "start": {
317                "line": 22,
318                "column": 3
319              },
320              "end": {
321                "line": 22,
322                "column": 31
323              }
324            }
325          }
326        ],
327        "loc": {
328          "start": {
329            "line": 21,
330            "column": 12
331          },
332          "end": {
333            "line": 23,
334            "column": 2
335          }
336        }
337      },
338      "alternate": null,
339      "loc": {
340        "start": {
341          "line": 21,
342          "column": 1
343        },
344        "end": {
345          "line": 23,
346          "column": 2
347        }
348      }
349    }
350  ],
351  "loc": {
352    "start": {
353      "line": 1,
354      "column": 1
355    },
356    "end": {
357      "line": 23,
358      "column": 2
359    }
360  }
361}
362