• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "TSInterfaceDeclaration",
6      "body": {
7        "type": "TSInterfaceBody",
8        "body": [
9          {
10            "type": "MethodDefinition",
11            "key": {
12              "type": "Identifier",
13              "name": "foo",
14              "decorators": [],
15              "loc": {
16                "start": {
17                  "line": 17,
18                  "column": 5
19                },
20                "end": {
21                  "line": 17,
22                  "column": 8
23                }
24              }
25            },
26            "kind": "method",
27            "accessibility": "public",
28            "static": false,
29            "optional": false,
30            "computed": false,
31            "value": {
32              "type": "FunctionExpression",
33              "function": {
34                "type": "ScriptFunction",
35                "id": {
36                  "type": "Identifier",
37                  "name": "foo",
38                  "decorators": [],
39                  "loc": {
40                    "start": {
41                      "line": 17,
42                      "column": 5
43                    },
44                    "end": {
45                      "line": 17,
46                      "column": 8
47                    }
48                  }
49                },
50                "generator": false,
51                "async": false,
52                "expression": false,
53                "params": [
54                  {
55                    "type": "ETSParameterExpression",
56                    "name": {
57                      "type": "Identifier",
58                      "name": "a0",
59                      "typeAnnotation": {
60                        "type": "ETSTypeReference",
61                        "part": {
62                          "type": "ETSTypeReferencePart",
63                          "name": {
64                            "type": "Identifier",
65                            "name": "T",
66                            "decorators": [],
67                            "loc": {
68                              "start": {
69                                "line": 17,
70                                "column": 13
71                              },
72                              "end": {
73                                "line": 17,
74                                "column": 14
75                              }
76                            }
77                          },
78                          "loc": {
79                            "start": {
80                              "line": 17,
81                              "column": 13
82                            },
83                            "end": {
84                              "line": 17,
85                              "column": 15
86                            }
87                          }
88                        },
89                        "loc": {
90                          "start": {
91                            "line": 17,
92                            "column": 13
93                          },
94                          "end": {
95                            "line": 17,
96                            "column": 15
97                          }
98                        }
99                      },
100                      "decorators": [],
101                      "loc": {
102                        "start": {
103                          "line": 17,
104                          "column": 9
105                        },
106                        "end": {
107                          "line": 17,
108                          "column": 15
109                        }
110                      }
111                    },
112                    "loc": {
113                      "start": {
114                        "line": 17,
115                        "column": 9
116                      },
117                      "end": {
118                        "line": 17,
119                        "column": 15
120                      }
121                    }
122                  }
123                ],
124                "returnType": {
125                  "type": "ETSPrimitiveType",
126                  "loc": {
127                    "start": {
128                      "line": 17,
129                      "column": 17
130                    },
131                    "end": {
132                      "line": 17,
133                      "column": 21
134                    }
135                  }
136                },
137                "loc": {
138                  "start": {
139                    "line": 17,
140                    "column": 8
141                  },
142                  "end": {
143                    "line": 17,
144                    "column": 21
145                  }
146                }
147              },
148              "loc": {
149                "start": {
150                  "line": 17,
151                  "column": 8
152                },
153                "end": {
154                  "line": 17,
155                  "column": 21
156                }
157              }
158            },
159            "overloads": [],
160            "decorators": [],
161            "loc": {
162              "start": {
163                "line": 17,
164                "column": 5
165              },
166              "end": {
167                "line": 17,
168                "column": 22
169              }
170            }
171          }
172        ],
173        "loc": {
174          "start": {
175            "line": 16,
176            "column": 15
177          },
178          "end": {
179            "line": 18,
180            "column": 2
181          }
182        }
183      },
184      "id": {
185        "type": "Identifier",
186        "name": "A",
187        "decorators": [],
188        "loc": {
189          "start": {
190            "line": 16,
191            "column": 11
192          },
193          "end": {
194            "line": 16,
195            "column": 12
196          }
197        }
198      },
199      "extends": [],
200      "typeParameters": {
201        "type": "TSTypeParameterDeclaration",
202        "params": [
203          {
204            "type": "TSTypeParameter",
205            "name": {
206              "type": "Identifier",
207              "name": "T",
208              "decorators": [],
209              "loc": {
210                "start": {
211                  "line": 16,
212                  "column": 13
213                },
214                "end": {
215                  "line": 16,
216                  "column": 14
217                }
218              }
219            },
220            "loc": {
221              "start": {
222                "line": 16,
223                "column": 13
224              },
225              "end": {
226                "line": 16,
227                "column": 15
228              }
229            }
230          }
231        ],
232        "loc": {
233          "start": {
234            "line": 16,
235            "column": 12
236          },
237          "end": {
238            "line": 16,
239            "column": 15
240          }
241        }
242      },
243      "loc": {
244        "start": {
245          "line": 16,
246          "column": 1
247        },
248        "end": {
249          "line": 20,
250          "column": 6
251        }
252      }
253    },
254    {
255      "type": "ClassDeclaration",
256      "definition": {
257        "id": {
258          "type": "Identifier",
259          "name": "B",
260          "decorators": [],
261          "loc": {
262            "start": {
263              "line": 20,
264              "column": 7
265            },
266            "end": {
267              "line": 20,
268              "column": 8
269            }
270          }
271        },
272        "typeParameters": {
273          "type": "TSTypeParameterDeclaration",
274          "params": [
275            {
276              "type": "TSTypeParameter",
277              "name": {
278                "type": "Identifier",
279                "name": "U",
280                "decorators": [],
281                "loc": {
282                  "start": {
283                    "line": 20,
284                    "column": 9
285                  },
286                  "end": {
287                    "line": 20,
288                    "column": 10
289                  }
290                }
291              },
292              "constraint": {
293                "type": "ETSTypeReference",
294                "part": {
295                  "type": "ETSTypeReferencePart",
296                  "name": {
297                    "type": "Identifier",
298                    "name": "A",
299                    "decorators": [],
300                    "loc": {
301                      "start": {
302                        "line": 20,
303                        "column": 19
304                      },
305                      "end": {
306                        "line": 20,
307                        "column": 20
308                      }
309                    }
310                  },
311                  "typeParams": {
312                    "type": "TSTypeParameterInstantiation",
313                    "params": [
314                      {
315                        "type": "ETSTypeReference",
316                        "part": {
317                          "type": "ETSTypeReferencePart",
318                          "name": {
319                            "type": "Identifier",
320                            "name": "Object",
321                            "decorators": [],
322                            "loc": {
323                              "start": {
324                                "line": 20,
325                                "column": 21
326                              },
327                              "end": {
328                                "line": 20,
329                                "column": 27
330                              }
331                            }
332                          },
333                          "loc": {
334                            "start": {
335                              "line": 20,
336                              "column": 21
337                            },
338                            "end": {
339                              "line": 20,
340                              "column": 29
341                            }
342                          }
343                        },
344                        "loc": {
345                          "start": {
346                            "line": 20,
347                            "column": 21
348                          },
349                          "end": {
350                            "line": 20,
351                            "column": 29
352                          }
353                        }
354                      }
355                    ],
356                    "loc": {
357                      "start": {
358                        "line": 20,
359                        "column": 20
360                      },
361                      "end": {
362                        "line": 20,
363                        "column": 29
364                      }
365                    }
366                  },
367                  "loc": {
368                    "start": {
369                      "line": 20,
370                      "column": 19
371                    },
372                    "end": {
373                      "line": 20,
374                      "column": 29
375                    }
376                  }
377                },
378                "loc": {
379                  "start": {
380                    "line": 20,
381                    "column": 19
382                  },
383                  "end": {
384                    "line": 20,
385                    "column": 29
386                  }
387                }
388              },
389              "loc": {
390                "start": {
391                  "line": 20,
392                  "column": 9
393                },
394                "end": {
395                  "line": 20,
396                  "column": 29
397                }
398              }
399            }
400          ],
401          "loc": {
402            "start": {
403              "line": 20,
404              "column": 8
405            },
406            "end": {
407              "line": 20,
408              "column": 29
409            }
410          }
411        },
412        "superClass": null,
413        "implements": [],
414        "body": [
415          {
416            "type": "ClassProperty",
417            "key": {
418              "type": "Identifier",
419              "name": "my_var",
420              "decorators": [],
421              "loc": {
422                "start": {
423                  "line": 21,
424                  "column": 13
425                },
426                "end": {
427                  "line": 21,
428                  "column": 19
429                }
430              }
431            },
432            "accessibility": "private",
433            "static": false,
434            "readonly": false,
435            "declare": false,
436            "optional": false,
437            "computed": false,
438            "typeAnnotation": {
439              "type": "ETSTypeReference",
440              "part": {
441                "type": "ETSTypeReferencePart",
442                "name": {
443                  "type": "Identifier",
444                  "name": "U",
445                  "decorators": [],
446                  "loc": {
447                    "start": {
448                      "line": 21,
449                      "column": 21
450                    },
451                    "end": {
452                      "line": 21,
453                      "column": 22
454                    }
455                  }
456                },
457                "loc": {
458                  "start": {
459                    "line": 21,
460                    "column": 21
461                  },
462                  "end": {
463                    "line": 21,
464                    "column": 23
465                  }
466                }
467              },
468              "loc": {
469                "start": {
470                  "line": 21,
471                  "column": 21
472                },
473                "end": {
474                  "line": 21,
475                  "column": 23
476                }
477              }
478            },
479            "definite": false,
480            "decorators": [],
481            "loc": {
482              "start": {
483                "line": 21,
484                "column": 13
485              },
486              "end": {
487                "line": 21,
488                "column": 23
489              }
490            }
491          },
492          {
493            "type": "MethodDefinition",
494            "key": {
495              "type": "Identifier",
496              "name": "constructor",
497              "decorators": [],
498              "loc": {
499                "start": {
500                  "line": 1,
501                  "column": 1
502                },
503                "end": {
504                  "line": 1,
505                  "column": 1
506                }
507              }
508            },
509            "kind": "constructor",
510            "accessibility": "public",
511            "static": false,
512            "optional": false,
513            "computed": false,
514            "value": {
515              "type": "FunctionExpression",
516              "function": {
517                "type": "ScriptFunction",
518                "id": {
519                  "type": "Identifier",
520                  "name": "constructor",
521                  "decorators": [],
522                  "loc": {
523                    "start": {
524                      "line": 1,
525                      "column": 1
526                    },
527                    "end": {
528                      "line": 1,
529                      "column": 1
530                    }
531                  }
532                },
533                "generator": false,
534                "async": false,
535                "expression": false,
536                "params": [
537                  {
538                    "type": "ETSParameterExpression",
539                    "name": {
540                      "type": "Identifier",
541                      "name": "my_var",
542                      "typeAnnotation": {
543                        "type": "ETSTypeReference",
544                        "part": {
545                          "type": "ETSTypeReferencePart",
546                          "name": {
547                            "type": "Identifier",
548                            "name": "U",
549                            "decorators": [],
550                            "loc": {
551                              "start": {
552                                "line": 23,
553                                "column": 25
554                              },
555                              "end": {
556                                "line": 23,
557                                "column": 26
558                              }
559                            }
560                          },
561                          "loc": {
562                            "start": {
563                              "line": 23,
564                              "column": 25
565                            },
566                            "end": {
567                              "line": 23,
568                              "column": 27
569                            }
570                          }
571                        },
572                        "loc": {
573                          "start": {
574                            "line": 23,
575                            "column": 25
576                          },
577                          "end": {
578                            "line": 23,
579                            "column": 27
580                          }
581                        }
582                      },
583                      "decorators": [],
584                      "loc": {
585                        "start": {
586                          "line": 23,
587                          "column": 17
588                        },
589                        "end": {
590                          "line": 23,
591                          "column": 27
592                        }
593                      }
594                    },
595                    "loc": {
596                      "start": {
597                        "line": 23,
598                        "column": 17
599                      },
600                      "end": {
601                        "line": 23,
602                        "column": 27
603                      }
604                    }
605                  }
606                ],
607                "body": {
608                  "type": "BlockStatement",
609                  "statements": [
610                    {
611                      "type": "ExpressionStatement",
612                      "expression": {
613                        "type": "AssignmentExpression",
614                        "operator": "=",
615                        "left": {
616                          "type": "MemberExpression",
617                          "object": {
618                            "type": "ThisExpression",
619                            "loc": {
620                              "start": {
621                                "line": 24,
622                                "column": 9
623                              },
624                              "end": {
625                                "line": 24,
626                                "column": 13
627                              }
628                            }
629                          },
630                          "property": {
631                            "type": "Identifier",
632                            "name": "my_var",
633                            "decorators": [],
634                            "loc": {
635                              "start": {
636                                "line": 24,
637                                "column": 14
638                              },
639                              "end": {
640                                "line": 24,
641                                "column": 20
642                              }
643                            }
644                          },
645                          "computed": false,
646                          "optional": false,
647                          "loc": {
648                            "start": {
649                              "line": 24,
650                              "column": 9
651                            },
652                            "end": {
653                              "line": 24,
654                              "column": 20
655                            }
656                          }
657                        },
658                        "right": {
659                          "type": "Identifier",
660                          "name": "my_var",
661                          "decorators": [],
662                          "loc": {
663                            "start": {
664                              "line": 24,
665                              "column": 23
666                            },
667                            "end": {
668                              "line": 24,
669                              "column": 29
670                            }
671                          }
672                        },
673                        "loc": {
674                          "start": {
675                            "line": 24,
676                            "column": 9
677                          },
678                          "end": {
679                            "line": 24,
680                            "column": 29
681                          }
682                        }
683                      },
684                      "loc": {
685                        "start": {
686                          "line": 24,
687                          "column": 9
688                        },
689                        "end": {
690                          "line": 24,
691                          "column": 30
692                        }
693                      }
694                    }
695                  ],
696                  "loc": {
697                    "start": {
698                      "line": 23,
699                      "column": 28
700                    },
701                    "end": {
702                      "line": 25,
703                      "column": 6
704                    }
705                  }
706                },
707                "loc": {
708                  "start": {
709                    "line": 23,
710                    "column": 16
711                  },
712                  "end": {
713                    "line": 25,
714                    "column": 6
715                  }
716                }
717              },
718              "loc": {
719                "start": {
720                  "line": 23,
721                  "column": 16
722                },
723                "end": {
724                  "line": 25,
725                  "column": 6
726                }
727              }
728            },
729            "overloads": [],
730            "decorators": [],
731            "loc": {
732              "start": {
733                "line": 23,
734                "column": 5
735              },
736              "end": {
737                "line": 25,
738                "column": 6
739              }
740            }
741          },
742          {
743            "type": "MethodDefinition",
744            "key": {
745              "type": "Identifier",
746              "name": "bar",
747              "decorators": [],
748              "loc": {
749                "start": {
750                  "line": 27,
751                  "column": 5
752                },
753                "end": {
754                  "line": 27,
755                  "column": 8
756                }
757              }
758            },
759            "kind": "method",
760            "accessibility": "public",
761            "static": false,
762            "optional": false,
763            "computed": false,
764            "value": {
765              "type": "FunctionExpression",
766              "function": {
767                "type": "ScriptFunction",
768                "id": {
769                  "type": "Identifier",
770                  "name": "bar",
771                  "decorators": [],
772                  "loc": {
773                    "start": {
774                      "line": 27,
775                      "column": 5
776                    },
777                    "end": {
778                      "line": 27,
779                      "column": 8
780                    }
781                  }
782                },
783                "generator": false,
784                "async": false,
785                "expression": false,
786                "params": [],
787                "returnType": {
788                  "type": "ETSPrimitiveType",
789                  "loc": {
790                    "start": {
791                      "line": 27,
792                      "column": 12
793                    },
794                    "end": {
795                      "line": 27,
796                      "column": 16
797                    }
798                  }
799                },
800                "body": {
801                  "type": "BlockStatement",
802                  "statements": [
803                    {
804                      "type": "VariableDeclaration",
805                      "declarations": [
806                        {
807                          "type": "VariableDeclarator",
808                          "id": {
809                            "type": "Identifier",
810                            "name": "a",
811                            "typeAnnotation": {
812                              "type": "ETSTypeReference",
813                              "part": {
814                                "type": "ETSTypeReferencePart",
815                                "name": {
816                                  "type": "Identifier",
817                                  "name": "Object",
818                                  "decorators": [],
819                                  "loc": {
820                                    "start": {
821                                      "line": 28,
822                                      "column": 16
823                                    },
824                                    "end": {
825                                      "line": 28,
826                                      "column": 22
827                                    }
828                                  }
829                                },
830                                "loc": {
831                                  "start": {
832                                    "line": 28,
833                                    "column": 16
834                                  },
835                                  "end": {
836                                    "line": 28,
837                                    "column": 24
838                                  }
839                                }
840                              },
841                              "loc": {
842                                "start": {
843                                  "line": 28,
844                                  "column": 16
845                                },
846                                "end": {
847                                  "line": 28,
848                                  "column": 24
849                                }
850                              }
851                            },
852                            "decorators": [],
853                            "loc": {
854                              "start": {
855                                "line": 28,
856                                "column": 13
857                              },
858                              "end": {
859                                "line": 28,
860                                "column": 14
861                              }
862                            }
863                          },
864                          "init": {
865                            "type": "MemberExpression",
866                            "object": {
867                              "type": "ThisExpression",
868                              "loc": {
869                                "start": {
870                                  "line": 28,
871                                  "column": 25
872                                },
873                                "end": {
874                                  "line": 28,
875                                  "column": 29
876                                }
877                              }
878                            },
879                            "property": {
880                              "type": "Identifier",
881                              "name": "my_var",
882                              "decorators": [],
883                              "loc": {
884                                "start": {
885                                  "line": 28,
886                                  "column": 30
887                                },
888                                "end": {
889                                  "line": 28,
890                                  "column": 36
891                                }
892                              }
893                            },
894                            "computed": false,
895                            "optional": false,
896                            "loc": {
897                              "start": {
898                                "line": 28,
899                                "column": 25
900                              },
901                              "end": {
902                                "line": 28,
903                                "column": 36
904                              }
905                            }
906                          },
907                          "loc": {
908                            "start": {
909                              "line": 28,
910                              "column": 13
911                            },
912                            "end": {
913                              "line": 28,
914                              "column": 36
915                            }
916                          }
917                        }
918                      ],
919                      "kind": "let",
920                      "loc": {
921                        "start": {
922                          "line": 28,
923                          "column": 9
924                        },
925                        "end": {
926                          "line": 28,
927                          "column": 37
928                        }
929                      }
930                    }
931                  ],
932                  "loc": {
933                    "start": {
934                      "line": 27,
935                      "column": 17
936                    },
937                    "end": {
938                      "line": 29,
939                      "column": 6
940                    }
941                  }
942                },
943                "loc": {
944                  "start": {
945                    "line": 27,
946                    "column": 8
947                  },
948                  "end": {
949                    "line": 29,
950                    "column": 6
951                  }
952                }
953              },
954              "loc": {
955                "start": {
956                  "line": 27,
957                  "column": 8
958                },
959                "end": {
960                  "line": 29,
961                  "column": 6
962                }
963              }
964            },
965            "overloads": [],
966            "decorators": [],
967            "loc": {
968              "start": {
969                "line": 27,
970                "column": 5
971              },
972              "end": {
973                "line": 29,
974                "column": 6
975              }
976            }
977          }
978        ],
979        "loc": {
980          "start": {
981            "line": 20,
982            "column": 29
983          },
984          "end": {
985            "line": 30,
986            "column": 2
987          }
988        }
989      },
990      "loc": {
991        "start": {
992          "line": 20,
993          "column": 1
994        },
995        "end": {
996          "line": 30,
997          "column": 2
998        }
999      }
1000    },
1001    {
1002      "type": "ClassDeclaration",
1003      "definition": {
1004        "id": {
1005          "type": "Identifier",
1006          "name": "ETSGLOBAL",
1007          "decorators": [],
1008          "loc": {
1009            "start": {
1010              "line": 1,
1011              "column": 1
1012            },
1013            "end": {
1014              "line": 1,
1015              "column": 1
1016            }
1017          }
1018        },
1019        "superClass": null,
1020        "implements": [],
1021        "body": [
1022          {
1023            "type": "MethodDefinition",
1024            "key": {
1025              "type": "Identifier",
1026              "name": "_$init$_",
1027              "decorators": [],
1028              "loc": {
1029                "start": {
1030                  "line": 1,
1031                  "column": 1
1032                },
1033                "end": {
1034                  "line": 1,
1035                  "column": 1
1036                }
1037              }
1038            },
1039            "kind": "method",
1040            "accessibility": "public",
1041            "static": true,
1042            "optional": false,
1043            "computed": false,
1044            "value": {
1045              "type": "FunctionExpression",
1046              "function": {
1047                "type": "ScriptFunction",
1048                "id": {
1049                  "type": "Identifier",
1050                  "name": "_$init$_",
1051                  "decorators": [],
1052                  "loc": {
1053                    "start": {
1054                      "line": 1,
1055                      "column": 1
1056                    },
1057                    "end": {
1058                      "line": 1,
1059                      "column": 1
1060                    }
1061                  }
1062                },
1063                "generator": false,
1064                "async": false,
1065                "expression": false,
1066                "params": [],
1067                "body": {
1068                  "type": "BlockStatement",
1069                  "statements": [],
1070                  "loc": {
1071                    "start": {
1072                      "line": 1,
1073                      "column": 1
1074                    },
1075                    "end": {
1076                      "line": 1,
1077                      "column": 1
1078                    }
1079                  }
1080                },
1081                "loc": {
1082                  "start": {
1083                    "line": 1,
1084                    "column": 1
1085                  },
1086                  "end": {
1087                    "line": 1,
1088                    "column": 1
1089                  }
1090                }
1091              },
1092              "loc": {
1093                "start": {
1094                  "line": 1,
1095                  "column": 1
1096                },
1097                "end": {
1098                  "line": 1,
1099                  "column": 1
1100                }
1101              }
1102            },
1103            "overloads": [],
1104            "decorators": [],
1105            "loc": {
1106              "start": {
1107                "line": 1,
1108                "column": 1
1109              },
1110              "end": {
1111                "line": 1,
1112                "column": 1
1113              }
1114            }
1115          }
1116        ],
1117        "loc": {
1118          "start": {
1119            "line": 1,
1120            "column": 1
1121          },
1122          "end": {
1123            "line": 1,
1124            "column": 1
1125          }
1126        }
1127      },
1128      "loc": {
1129        "start": {
1130          "line": 1,
1131          "column": 1
1132        },
1133        "end": {
1134          "line": 1,
1135          "column": 1
1136        }
1137      }
1138    }
1139  ],
1140  "loc": {
1141    "start": {
1142      "line": 1,
1143      "column": 1
1144    },
1145    "end": {
1146      "line": 31,
1147      "column": 1
1148    }
1149  }
1150}
1151