• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "ClassDeclaration",
6      "definition": {
7        "id": {
8          "type": "Identifier",
9          "name": "Foo",
10          "loc": {
11            "start": {
12              "line": 17,
13              "column": 7
14            },
15            "end": {
16              "line": 17,
17              "column": 10
18            }
19          }
20        },
21        "superClass": null,
22        "implements": [],
23        "constructor": {
24          "type": "MethodDefinition",
25          "key": {
26            "type": "Identifier",
27            "name": "constructor",
28            "loc": {
29              "start": {
30                "line": 1,
31                "column": 1
32              },
33              "end": {
34                "line": 1,
35                "column": 1
36              }
37            }
38          },
39          "kind": "constructor",
40          "static": false,
41          "optional": false,
42          "computed": false,
43          "value": {
44            "type": "FunctionExpression",
45            "function": {
46              "type": "ScriptFunction",
47              "id": null,
48              "generator": false,
49              "async": false,
50              "expression": false,
51              "params": [],
52              "body": {
53                "type": "BlockStatement",
54                "statements": [],
55                "loc": {
56                  "start": {
57                    "line": 1,
58                    "column": 1
59                  },
60                  "end": {
61                    "line": 1,
62                    "column": 1
63                  }
64                }
65              },
66              "loc": {
67                "start": {
68                  "line": 1,
69                  "column": 1
70                },
71                "end": {
72                  "line": 1,
73                  "column": 1
74                }
75              }
76            },
77            "loc": {
78              "start": {
79                "line": 1,
80                "column": 1
81              },
82              "end": {
83                "line": 1,
84                "column": 1
85              }
86            }
87          },
88          "overloads": [],
89          "decorators": [],
90          "loc": {
91            "start": {
92              "line": 17,
93              "column": 1
94            },
95            "end": {
96              "line": 24,
97              "column": 2
98            }
99          }
100        },
101        "body": [
102          {
103            "type": "ClassProperty",
104            "key": {
105              "type": "Identifier",
106              "name": "str",
107              "loc": {
108                "start": {
109                  "line": 18,
110                  "column": 3
111                },
112                "end": {
113                  "line": 18,
114                  "column": 6
115                }
116              }
117            },
118            "value": {
119              "type": "StringLiteral",
120              "value": "hello",
121              "loc": {
122                "start": {
123                  "line": 18,
124                  "column": 17
125                },
126                "end": {
127                  "line": 18,
128                  "column": 24
129                }
130              }
131            },
132            "static": false,
133            "readonly": false,
134            "declare": false,
135            "optional": false,
136            "computed": false,
137            "typeAnnotation": {
138              "type": "TSStringKeyword",
139              "loc": {
140                "start": {
141                  "line": 18,
142                  "column": 8
143                },
144                "end": {
145                  "line": 18,
146                  "column": 14
147                }
148              }
149            },
150            "decorators": [],
151            "loc": {
152              "start": {
153                "line": 18,
154                "column": 3
155              },
156              "end": {
157                "line": 18,
158                "column": 24
159              }
160            }
161          },
162          {
163            "type": "ClassProperty",
164            "key": {
165              "type": "Identifier",
166              "name": "num",
167              "loc": {
168                "start": {
169                  "line": 19,
170                  "column": 3
171                },
172                "end": {
173                  "line": 19,
174                  "column": 6
175                }
176              }
177            },
178            "value": {
179              "type": "NumberLiteral",
180              "value": 123,
181              "loc": {
182                "start": {
183                  "line": 19,
184                  "column": 17
185                },
186                "end": {
187                  "line": 19,
188                  "column": 20
189                }
190              }
191            },
192            "static": false,
193            "readonly": false,
194            "declare": false,
195            "optional": false,
196            "computed": false,
197            "typeAnnotation": {
198              "type": "TSNumberKeyword",
199              "loc": {
200                "start": {
201                  "line": 19,
202                  "column": 8
203                },
204                "end": {
205                  "line": 19,
206                  "column": 14
207                }
208              }
209            },
210            "decorators": [],
211            "loc": {
212              "start": {
213                "line": 19,
214                "column": 3
215              },
216              "end": {
217                "line": 19,
218                "column": 20
219              }
220            }
221          }
222        ],
223        "indexSignatures": [
224          {
225            "type": "TSIndexSignature",
226            "parameters": {
227              "type": "Identifier",
228              "name": "propName",
229              "typeAnnotation": {
230                "type": "TSStringKeyword",
231                "loc": {
232                  "start": {
233                    "line": 20,
234                    "column": 14
235                  },
236                  "end": {
237                    "line": 20,
238                    "column": 20
239                  }
240                }
241              },
242              "loc": {
243                "start": {
244                  "line": 20,
245                  "column": 4
246                },
247                "end": {
248                  "line": 20,
249                  "column": 12
250                }
251              }
252            },
253            "typeAnnotation": {
254              "type": "TSUnionType",
255              "types": [
256                {
257                  "type": "TSStringKeyword",
258                  "loc": {
259                    "start": {
260                      "line": 20,
261                      "column": 23
262                    },
263                    "end": {
264                      "line": 20,
265                      "column": 29
266                    }
267                  }
268                },
269                {
270                  "type": "TSNumberKeyword",
271                  "loc": {
272                    "start": {
273                      "line": 20,
274                      "column": 32
275                    },
276                    "end": {
277                      "line": 20,
278                      "column": 38
279                    }
280                  }
281                }
282              ],
283              "loc": {
284                "start": {
285                  "line": 20,
286                  "column": 23
287                },
288                "end": {
289                  "line": 20,
290                  "column": 38
291                }
292              }
293            },
294            "readonly": false,
295            "static": false,
296            "loc": {
297              "start": {
298                "line": 20,
299                "column": 3
300              },
301              "end": {
302                "line": 20,
303                "column": 38
304              }
305            }
306          },
307          {
308            "type": "TSIndexSignature",
309            "parameters": {
310              "type": "Identifier",
311              "name": "propName",
312              "typeAnnotation": {
313                "type": "TSStringKeyword",
314                "loc": {
315                  "start": {
316                    "line": 21,
317                    "column": 21
318                  },
319                  "end": {
320                    "line": 21,
321                    "column": 27
322                  }
323                }
324              },
325              "loc": {
326                "start": {
327                  "line": 21,
328                  "column": 11
329                },
330                "end": {
331                  "line": 21,
332                  "column": 19
333                }
334              }
335            },
336            "typeAnnotation": {
337              "type": "TSUnionType",
338              "types": [
339                {
340                  "type": "TSStringKeyword",
341                  "loc": {
342                    "start": {
343                      "line": 21,
344                      "column": 30
345                    },
346                    "end": {
347                      "line": 21,
348                      "column": 36
349                    }
350                  }
351                },
352                {
353                  "type": "TSNumberKeyword",
354                  "loc": {
355                    "start": {
356                      "line": 21,
357                      "column": 39
358                    },
359                    "end": {
360                      "line": 21,
361                      "column": 45
362                    }
363                  }
364                }
365              ],
366              "loc": {
367                "start": {
368                  "line": 21,
369                  "column": 30
370                },
371                "end": {
372                  "line": 21,
373                  "column": 45
374                }
375              }
376            },
377            "readonly": false,
378            "static": true,
379            "loc": {
380              "start": {
381                "line": 21,
382                "column": 3
383              },
384              "end": {
385                "line": 21,
386                "column": 45
387              }
388            }
389          },
390          {
391            "type": "TSIndexSignature",
392            "parameters": {
393              "type": "Identifier",
394              "name": "propName",
395              "typeAnnotation": {
396                "type": "TSNumberKeyword",
397                "loc": {
398                  "start": {
399                    "line": 22,
400                    "column": 23
401                  },
402                  "end": {
403                    "line": 22,
404                    "column": 29
405                  }
406                }
407              },
408              "loc": {
409                "start": {
410                  "line": 22,
411                  "column": 13
412                },
413                "end": {
414                  "line": 22,
415                  "column": 21
416                }
417              }
418            },
419            "typeAnnotation": {
420              "type": "TSStringKeyword",
421              "loc": {
422                "start": {
423                  "line": 22,
424                  "column": 32
425                },
426                "end": {
427                  "line": 22,
428                  "column": 38
429                }
430              }
431            },
432            "readonly": true,
433            "static": false,
434            "loc": {
435              "start": {
436                "line": 22,
437                "column": 3
438              },
439              "end": {
440                "line": 22,
441                "column": 38
442              }
443            }
444          },
445          {
446            "type": "TSIndexSignature",
447            "parameters": {
448              "type": "Identifier",
449              "name": "propName",
450              "typeAnnotation": {
451                "type": "TSNumberKeyword",
452                "loc": {
453                  "start": {
454                    "line": 23,
455                    "column": 30
456                  },
457                  "end": {
458                    "line": 23,
459                    "column": 36
460                  }
461                }
462              },
463              "loc": {
464                "start": {
465                  "line": 23,
466                  "column": 20
467                },
468                "end": {
469                  "line": 23,
470                  "column": 28
471                }
472              }
473            },
474            "typeAnnotation": {
475              "type": "TSStringKeyword",
476              "loc": {
477                "start": {
478                  "line": 23,
479                  "column": 39
480                },
481                "end": {
482                  "line": 23,
483                  "column": 45
484                }
485              }
486            },
487            "readonly": true,
488            "static": true,
489            "loc": {
490              "start": {
491                "line": 23,
492                "column": 3
493              },
494              "end": {
495                "line": 23,
496                "column": 45
497              }
498            }
499          }
500        ],
501        "loc": {
502          "start": {
503            "line": 17,
504            "column": 11
505          },
506          "end": {
507            "line": 24,
508            "column": 2
509          }
510        }
511      },
512      "decorators": [],
513      "loc": {
514        "start": {
515          "line": 17,
516          "column": 1
517        },
518        "end": {
519          "line": 24,
520          "column": 2
521        }
522      }
523    },
524    {
525      "type": "ExpressionStatement",
526      "expression": {
527        "type": "AssignmentExpression",
528        "operator": "=",
529        "left": {
530          "type": "MemberExpression",
531          "object": {
532            "type": "Identifier",
533            "name": "Foo",
534            "loc": {
535              "start": {
536                "line": 26,
537                "column": 1
538              },
539              "end": {
540                "line": 26,
541                "column": 4
542              }
543            }
544          },
545          "property": {
546            "type": "StringLiteral",
547            "value": "whatever",
548            "loc": {
549              "start": {
550                "line": 26,
551                "column": 5
552              },
553              "end": {
554                "line": 26,
555                "column": 15
556              }
557            }
558          },
559          "computed": true,
560          "optional": false,
561          "loc": {
562            "start": {
563              "line": 26,
564              "column": 1
565            },
566            "end": {
567              "line": 26,
568              "column": 16
569            }
570          }
571        },
572        "right": {
573          "type": "NumberLiteral",
574          "value": 456,
575          "loc": {
576            "start": {
577              "line": 26,
578              "column": 19
579            },
580            "end": {
581              "line": 26,
582              "column": 22
583            }
584          }
585        },
586        "loc": {
587          "start": {
588            "line": 26,
589            "column": 1
590          },
591          "end": {
592            "line": 26,
593            "column": 22
594          }
595        }
596      },
597      "loc": {
598        "start": {
599          "line": 26,
600          "column": 1
601        },
602        "end": {
603          "line": 26,
604          "column": 23
605        }
606      }
607    },
608    {
609      "type": "VariableDeclaration",
610      "declarations": [
611        {
612          "type": "VariableDeclarator",
613          "id": {
614            "type": "Identifier",
615            "name": "foo",
616            "typeAnnotation": {
617              "type": "TSTypeReference",
618              "typeName": {
619                "type": "Identifier",
620                "name": "Foo",
621                "loc": {
622                  "start": {
623                    "line": 27,
624                    "column": 10
625                  },
626                  "end": {
627                    "line": 27,
628                    "column": 13
629                  }
630                }
631              },
632              "loc": {
633                "start": {
634                  "line": 27,
635                  "column": 10
636                },
637                "end": {
638                  "line": 27,
639                  "column": 13
640                }
641              }
642            },
643            "loc": {
644              "start": {
645                "line": 27,
646                "column": 5
647              },
648              "end": {
649                "line": 27,
650                "column": 8
651              }
652            }
653          },
654          "init": {
655            "type": "NewExpression",
656            "callee": {
657              "type": "Identifier",
658              "name": "Foo",
659              "loc": {
660                "start": {
661                  "line": 27,
662                  "column": 20
663                },
664                "end": {
665                  "line": 27,
666                  "column": 23
667                }
668              }
669            },
670            "arguments": [],
671            "loc": {
672              "start": {
673                "line": 27,
674                "column": 16
675              },
676              "end": {
677                "line": 27,
678                "column": 25
679              }
680            }
681          },
682          "loc": {
683            "start": {
684              "line": 27,
685              "column": 5
686            },
687            "end": {
688              "line": 27,
689              "column": 25
690            }
691          }
692        }
693      ],
694      "kind": "let",
695      "loc": {
696        "start": {
697          "line": 27,
698          "column": 1
699        },
700        "end": {
701          "line": 27,
702          "column": 26
703        }
704      }
705    },
706    {
707      "type": "ExpressionStatement",
708      "expression": {
709        "type": "AssignmentExpression",
710        "operator": "=",
711        "left": {
712          "type": "MemberExpression",
713          "object": {
714            "type": "Identifier",
715            "name": "foo",
716            "loc": {
717              "start": {
718                "line": 28,
719                "column": 1
720              },
721              "end": {
722                "line": 28,
723                "column": 4
724              }
725            }
726          },
727          "property": {
728            "type": "StringLiteral",
729            "value": "word",
730            "loc": {
731              "start": {
732                "line": 28,
733                "column": 5
734              },
735              "end": {
736                "line": 28,
737                "column": 11
738              }
739            }
740          },
741          "computed": true,
742          "optional": false,
743          "loc": {
744            "start": {
745              "line": 28,
746              "column": 1
747            },
748            "end": {
749              "line": 28,
750              "column": 12
751            }
752          }
753        },
754        "right": {
755          "type": "StringLiteral",
756          "value": "hi",
757          "loc": {
758            "start": {
759              "line": 28,
760              "column": 15
761            },
762            "end": {
763              "line": 28,
764              "column": 19
765            }
766          }
767        },
768        "loc": {
769          "start": {
770            "line": 28,
771            "column": 1
772          },
773          "end": {
774            "line": 28,
775            "column": 19
776          }
777        }
778      },
779      "loc": {
780        "start": {
781          "line": 28,
782          "column": 1
783        },
784        "end": {
785          "line": 28,
786          "column": 20
787        }
788      }
789    }
790  ],
791  "loc": {
792    "start": {
793      "line": 1,
794      "column": 1
795    },
796    "end": {
797      "line": 28,
798      "column": 20
799    }
800  }
801}
802