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