1{
2  "type": "Program",
3  "statements": [
4    {
5      "type": "ClassDeclaration",
6      "definition": {
7        "id": {
8          "type": "Identifier",
9          "name": "B",
10          "decorators": [],
11          "loc": {
12            "start": {
13              "line": 16,
14              "column": 7
15            },
16            "end": {
17              "line": 16,
18              "column": 8
19            }
20          }
21        },
22        "typeParameters": {
23          "type": "TSTypeParameterDeclaration",
24          "params": [
25            {
26              "type": "TSTypeParameter",
27              "name": {
28                "type": "Identifier",
29                "name": "T",
30                "decorators": [],
31                "loc": {
32                  "start": {
33                    "line": 16,
34                    "column": 9
35                  },
36                  "end": {
37                    "line": 16,
38                    "column": 10
39                  }
40                }
41              },
42              "constraint": {
43                "type": "ETSTypeReference",
44                "part": {
45                  "type": "ETSTypeReferencePart",
46                  "name": {
47                    "type": "Identifier",
48                    "name": "Object",
49                    "decorators": [],
50                    "loc": {
51                      "start": {
52                        "line": 16,
53                        "column": 19
54                      },
55                      "end": {
56                        "line": 16,
57                        "column": 25
58                      }
59                    }
60                  },
61                  "loc": {
62                    "start": {
63                      "line": 16,
64                      "column": 19
65                    },
66                    "end": {
67                      "line": 16,
68                      "column": 26
69                    }
70                  }
71                },
72                "loc": {
73                  "start": {
74                    "line": 16,
75                    "column": 19
76                  },
77                  "end": {
78                    "line": 16,
79                    "column": 26
80                  }
81                }
82              },
83              "loc": {
84                "start": {
85                  "line": 16,
86                  "column": 9
87                },
88                "end": {
89                  "line": 16,
90                  "column": 26
91                }
92              }
93            }
94          ],
95          "loc": {
96            "start": {
97              "line": 16,
98              "column": 8
99            },
100            "end": {
101              "line": 16,
102              "column": 26
103            }
104          }
105        },
106        "superClass": null,
107        "implements": [],
108        "body": [
109          {
110            "type": "ClassProperty",
111            "key": {
112              "type": "Identifier",
113              "name": "a0",
114              "decorators": [],
115              "loc": {
116                "start": {
117                  "line": 17,
118                  "column": 13
119                },
120                "end": {
121                  "line": 17,
122                  "column": 15
123                }
124              }
125            },
126            "accessibility": "private",
127            "static": false,
128            "readonly": false,
129            "declare": false,
130            "optional": false,
131            "computed": false,
132            "typeAnnotation": {
133              "type": "ETSTypeReference",
134              "part": {
135                "type": "ETSTypeReferencePart",
136                "name": {
137                  "type": "Identifier",
138                  "name": "T",
139                  "decorators": [],
140                  "loc": {
141                    "start": {
142                      "line": 17,
143                      "column": 17
144                    },
145                    "end": {
146                      "line": 17,
147                      "column": 18
148                    }
149                  }
150                },
151                "loc": {
152                  "start": {
153                    "line": 17,
154                    "column": 17
155                  },
156                  "end": {
157                    "line": 17,
158                    "column": 19
159                  }
160                }
161              },
162              "loc": {
163                "start": {
164                  "line": 17,
165                  "column": 17
166                },
167                "end": {
168                  "line": 17,
169                  "column": 19
170                }
171              }
172            },
173            "definite": false,
174            "decorators": [],
175            "loc": {
176              "start": {
177                "line": 17,
178                "column": 13
179              },
180              "end": {
181                "line": 17,
182                "column": 19
183              }
184            }
185          },
186          {
187            "type": "MethodDefinition",
188            "key": {
189              "type": "Identifier",
190              "name": "constructor",
191              "decorators": [],
192              "loc": {
193                "start": {
194                  "line": 1,
195                  "column": 1
196                },
197                "end": {
198                  "line": 1,
199                  "column": 1
200                }
201              }
202            },
203            "kind": "constructor",
204            "accessibility": "public",
205            "static": false,
206            "optional": false,
207            "computed": false,
208            "value": {
209              "type": "FunctionExpression",
210              "function": {
211                "type": "ScriptFunction",
212                "id": {
213                  "type": "Identifier",
214                  "name": "constructor",
215                  "decorators": [],
216                  "loc": {
217                    "start": {
218                      "line": 1,
219                      "column": 1
220                    },
221                    "end": {
222                      "line": 1,
223                      "column": 1
224                    }
225                  }
226                },
227                "generator": false,
228                "async": false,
229                "expression": false,
230                "params": [
231                  {
232                    "type": "ETSParameterExpression",
233                    "name": {
234                      "type": "Identifier",
235                      "name": "a0",
236                      "typeAnnotation": {
237                        "type": "ETSTypeReference",
238                        "part": {
239                          "type": "ETSTypeReferencePart",
240                          "name": {
241                            "type": "Identifier",
242                            "name": "T",
243                            "decorators": [],
244                            "loc": {
245                              "start": {
246                                "line": 18,
247                                "column": 21
248                              },
249                              "end": {
250                                "line": 18,
251                                "column": 22
252                              }
253                            }
254                          },
255                          "loc": {
256                            "start": {
257                              "line": 18,
258                              "column": 21
259                            },
260                            "end": {
261                              "line": 18,
262                              "column": 23
263                            }
264                          }
265                        },
266                        "loc": {
267                          "start": {
268                            "line": 18,
269                            "column": 21
270                          },
271                          "end": {
272                            "line": 18,
273                            "column": 23
274                          }
275                        }
276                      },
277                      "decorators": [],
278                      "loc": {
279                        "start": {
280                          "line": 18,
281                          "column": 17
282                        },
283                        "end": {
284                          "line": 18,
285                          "column": 23
286                        }
287                      }
288                    },
289                    "loc": {
290                      "start": {
291                        "line": 18,
292                        "column": 17
293                      },
294                      "end": {
295                        "line": 18,
296                        "column": 23
297                      }
298                    }
299                  }
300                ],
301                "body": {
302                  "type": "BlockStatement",
303                  "statements": [
304                    {
305                      "type": "ExpressionStatement",
306                      "expression": {
307                        "type": "AssignmentExpression",
308                        "operator": "=",
309                        "left": {
310                          "type": "MemberExpression",
311                          "object": {
312                            "type": "ThisExpression",
313                            "loc": {
314                              "start": {
315                                "line": 19,
316                                "column": 9
317                              },
318                              "end": {
319                                "line": 19,
320                                "column": 13
321                              }
322                            }
323                          },
324                          "property": {
325                            "type": "Identifier",
326                            "name": "a0",
327                            "decorators": [],
328                            "loc": {
329                              "start": {
330                                "line": 19,
331                                "column": 14
332                              },
333                              "end": {
334                                "line": 19,
335                                "column": 16
336                              }
337                            }
338                          },
339                          "computed": false,
340                          "optional": false,
341                          "loc": {
342                            "start": {
343                              "line": 19,
344                              "column": 9
345                            },
346                            "end": {
347                              "line": 19,
348                              "column": 16
349                            }
350                          }
351                        },
352                        "right": {
353                          "type": "Identifier",
354                          "name": "a0",
355                          "decorators": [],
356                          "loc": {
357                            "start": {
358                              "line": 19,
359                              "column": 19
360                            },
361                            "end": {
362                              "line": 19,
363                              "column": 21
364                            }
365                          }
366                        },
367                        "loc": {
368                          "start": {
369                            "line": 19,
370                            "column": 9
371                          },
372                          "end": {
373                            "line": 19,
374                            "column": 21
375                          }
376                        }
377                      },
378                      "loc": {
379                        "start": {
380                          "line": 19,
381                          "column": 9
382                        },
383                        "end": {
384                          "line": 19,
385                          "column": 22
386                        }
387                      }
388                    }
389                  ],
390                  "loc": {
391                    "start": {
392                      "line": 18,
393                      "column": 24
394                    },
395                    "end": {
396                      "line": 20,
397                      "column": 6
398                    }
399                  }
400                },
401                "loc": {
402                  "start": {
403                    "line": 18,
404                    "column": 16
405                  },
406                  "end": {
407                    "line": 20,
408                    "column": 6
409                  }
410                }
411              },
412              "loc": {
413                "start": {
414                  "line": 18,
415                  "column": 16
416                },
417                "end": {
418                  "line": 20,
419                  "column": 6
420                }
421              }
422            },
423            "overloads": [],
424            "decorators": [],
425            "loc": {
426              "start": {
427                "line": 18,
428                "column": 5
429              },
430              "end": {
431                "line": 20,
432                "column": 6
433              }
434            }
435          },
436          {
437            "type": "MethodDefinition",
438            "key": {
439              "type": "Identifier",
440              "name": "f1",
441              "decorators": [],
442              "loc": {
443                "start": {
444                  "line": 21,
445                  "column": 12
446                },
447                "end": {
448                  "line": 21,
449                  "column": 14
450                }
451              }
452            },
453            "kind": "method",
454            "accessibility": "public",
455            "static": false,
456            "optional": false,
457            "computed": false,
458            "value": {
459              "type": "FunctionExpression",
460              "function": {
461                "type": "ScriptFunction",
462                "id": {
463                  "type": "Identifier",
464                  "name": "f1",
465                  "decorators": [],
466                  "loc": {
467                    "start": {
468                      "line": 21,
469                      "column": 12
470                    },
471                    "end": {
472                      "line": 21,
473                      "column": 14
474                    }
475                  }
476                },
477                "generator": false,
478                "async": false,
479                "expression": false,
480                "params": [],
481                "returnType": {
482                  "type": "ETSTypeReference",
483                  "part": {
484                    "type": "ETSTypeReferencePart",
485                    "name": {
486                      "type": "Identifier",
487                      "name": "T",
488                      "decorators": [],
489                      "loc": {
490                        "start": {
491                          "line": 21,
492                          "column": 18
493                        },
494                        "end": {
495                          "line": 21,
496                          "column": 19
497                        }
498                      }
499                    },
500                    "loc": {
501                      "start": {
502                        "line": 21,
503                        "column": 18
504                      },
505                      "end": {
506                        "line": 21,
507                        "column": 21
508                      }
509                    }
510                  },
511                  "loc": {
512                    "start": {
513                      "line": 21,
514                      "column": 18
515                    },
516                    "end": {
517                      "line": 21,
518                      "column": 21
519                    }
520                  }
521                },
522                "body": {
523                  "type": "BlockStatement",
524                  "statements": [
525                    {
526                      "type": "ReturnStatement",
527                      "argument": {
528                        "type": "MemberExpression",
529                        "object": {
530                          "type": "ThisExpression",
531                          "loc": {
532                            "start": {
533                              "line": 22,
534                              "column": 16
535                            },
536                            "end": {
537                              "line": 22,
538                              "column": 20
539                            }
540                          }
541                        },
542                        "property": {
543                          "type": "Identifier",
544                          "name": "a0",
545                          "decorators": [],
546                          "loc": {
547                            "start": {
548                              "line": 22,
549                              "column": 21
550                            },
551                            "end": {
552                              "line": 22,
553                              "column": 23
554                            }
555                          }
556                        },
557                        "computed": false,
558                        "optional": false,
559                        "loc": {
560                          "start": {
561                            "line": 22,
562                            "column": 16
563                          },
564                          "end": {
565                            "line": 22,
566                            "column": 23
567                          }
568                        }
569                      },
570                      "loc": {
571                        "start": {
572                          "line": 22,
573                          "column": 9
574                        },
575                        "end": {
576                          "line": 22,
577                          "column": 24
578                        }
579                      }
580                    }
581                  ],
582                  "loc": {
583                    "start": {
584                      "line": 21,
585                      "column": 20
586                    },
587                    "end": {
588                      "line": 23,
589                      "column": 6
590                    }
591                  }
592                },
593                "loc": {
594                  "start": {
595                    "line": 21,
596                    "column": 14
597                  },
598                  "end": {
599                    "line": 23,
600                    "column": 6
601                  }
602                }
603              },
604              "loc": {
605                "start": {
606                  "line": 21,
607                  "column": 14
608                },
609                "end": {
610                  "line": 23,
611                  "column": 6
612                }
613              }
614            },
615            "overloads": [],
616            "decorators": [],
617            "loc": {
618              "start": {
619                "line": 21,
620                "column": 5
621              },
622              "end": {
623                "line": 23,
624                "column": 6
625              }
626            }
627          }
628        ],
629        "loc": {
630          "start": {
631            "line": 16,
632            "column": 27
633          },
634          "end": {
635            "line": 24,
636            "column": 2
637          }
638        }
639      },
640      "loc": {
641        "start": {
642          "line": 16,
643          "column": 1
644        },
645        "end": {
646          "line": 24,
647          "column": 2
648        }
649      }
650    },
651    {
652      "type": "ClassDeclaration",
653      "definition": {
654        "id": {
655          "type": "Identifier",
656          "name": "A",
657          "decorators": [],
658          "loc": {
659            "start": {
660              "line": 26,
661              "column": 7
662            },
663            "end": {
664              "line": 26,
665              "column": 8
666            }
667          }
668        },
669        "superClass": null,
670        "implements": [],
671        "body": [
672          {
673            "type": "MethodDefinition",
674            "key": {
675              "type": "Identifier",
676              "name": "foo",
677              "decorators": [],
678              "loc": {
679                "start": {
680                  "line": 27,
681                  "column": 12
682                },
683                "end": {
684                  "line": 27,
685                  "column": 15
686                }
687              }
688            },
689            "kind": "method",
690            "accessibility": "public",
691            "static": false,
692            "optional": false,
693            "computed": false,
694            "value": {
695              "type": "FunctionExpression",
696              "function": {
697                "type": "ScriptFunction",
698                "id": {
699                  "type": "Identifier",
700                  "name": "foo",
701                  "decorators": [],
702                  "loc": {
703                    "start": {
704                      "line": 27,
705                      "column": 12
706                    },
707                    "end": {
708                      "line": 27,
709                      "column": 15
710                    }
711                  }
712                },
713                "generator": false,
714                "async": false,
715                "expression": false,
716                "params": [
717                  {
718                    "type": "ETSParameterExpression",
719                    "name": {
720                      "type": "Identifier",
721                      "name": "token",
722                      "typeAnnotation": {
723                        "type": "ETSTypeReference",
724                        "part": {
725                          "type": "ETSTypeReferencePart",
726                          "name": {
727                            "type": "Identifier",
728                            "name": "Object",
729                            "decorators": [],
730                            "loc": {
731                              "start": {
732                                "line": 27,
733                                "column": 23
734                              },
735                              "end": {
736                                "line": 27,
737                                "column": 29
738                              }
739                            }
740                          },
741                          "loc": {
742                            "start": {
743                              "line": 27,
744                              "column": 23
745                            },
746                            "end": {
747                              "line": 27,
748                              "column": 30
749                            }
750                          }
751                        },
752                        "loc": {
753                          "start": {
754                            "line": 27,
755                            "column": 23
756                          },
757                          "end": {
758                            "line": 27,
759                            "column": 30
760                          }
761                        }
762                      },
763                      "decorators": [],
764                      "loc": {
765                        "start": {
766                          "line": 27,
767                          "column": 16
768                        },
769                        "end": {
770                          "line": 27,
771                          "column": 30
772                        }
773                      }
774                    },
775                    "loc": {
776                      "start": {
777                        "line": 27,
778                        "column": 16
779                      },
780                      "end": {
781                        "line": 27,
782                        "column": 30
783                      }
784                    }
785                  }
786                ],
787                "returnType": {
788                  "type": "ETSPrimitiveType",
789                  "loc": {
790                    "start": {
791                      "line": 27,
792                      "column": 33
793                    },
794                    "end": {
795                      "line": 27,
796                      "column": 37
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": "refToken",
811                            "typeAnnotation": {
812                              "type": "ETSTypeReference",
813                              "part": {
814                                "type": "ETSTypeReferencePart",
815                                "name": {
816                                  "type": "Identifier",
817                                  "name": "B",
818                                  "decorators": [],
819                                  "loc": {
820                                    "start": {
821                                      "line": 28,
822                                      "column": 23
823                                    },
824                                    "end": {
825                                      "line": 28,
826                                      "column": 24
827                                    }
828                                  }
829                                },
830                                "typeParams": {
831                                  "type": "TSTypeParameterInstantiation",
832                                  "params": [
833                                    {
834                                      "type": "ETSTypeReference",
835                                      "part": {
836                                        "type": "ETSTypeReferencePart",
837                                        "name": {
838                                          "type": "Identifier",
839                                          "name": "Object",
840                                          "decorators": [],
841                                          "loc": {
842                                            "start": {
843                                              "line": 28,
844                                              "column": 25
845                                            },
846                                            "end": {
847                                              "line": 28,
848                                              "column": 31
849                                            }
850                                          }
851                                        },
852                                        "loc": {
853                                          "start": {
854                                            "line": 28,
855                                            "column": 25
856                                          },
857                                          "end": {
858                                            "line": 28,
859                                            "column": 32
860                                          }
861                                        }
862                                      },
863                                      "loc": {
864                                        "start": {
865                                          "line": 28,
866                                          "column": 25
867                                        },
868                                        "end": {
869                                          "line": 28,
870                                          "column": 32
871                                        }
872                                      }
873                                    }
874                                  ],
875                                  "loc": {
876                                    "start": {
877                                      "line": 28,
878                                      "column": 24
879                                    },
880                                    "end": {
881                                      "line": 28,
882                                      "column": 32
883                                    }
884                                  }
885                                },
886                                "loc": {
887                                  "start": {
888                                    "line": 28,
889                                    "column": 23
890                                  },
891                                  "end": {
892                                    "line": 28,
893                                    "column": 34
894                                  }
895                                }
896                              },
897                              "loc": {
898                                "start": {
899                                  "line": 28,
900                                  "column": 23
901                                },
902                                "end": {
903                                  "line": 28,
904                                  "column": 34
905                                }
906                              }
907                            },
908                            "decorators": [],
909                            "loc": {
910                              "start": {
911                                "line": 28,
912                                "column": 13
913                              },
914                              "end": {
915                                "line": 28,
916                                "column": 21
917                              }
918                            }
919                          },
920                          "init": {
921                            "type": "TSAsExpression",
922                            "expression": {
923                              "type": "CallExpression",
924                              "callee": {
925                                "type": "MemberExpression",
926                                "object": {
927                                  "type": "ThisExpression",
928                                  "loc": {
929                                    "start": {
930                                      "line": 28,
931                                      "column": 35
932                                    },
933                                    "end": {
934                                      "line": 28,
935                                      "column": 39
936                                    }
937                                  }
938                                },
939                                "property": {
940                                  "type": "Identifier",
941                                  "name": "f2",
942                                  "decorators": [],
943                                  "loc": {
944                                    "start": {
945                                      "line": 28,
946                                      "column": 40
947                                    },
948                                    "end": {
949                                      "line": 28,
950                                      "column": 42
951                                    }
952                                  }
953                                },
954                                "computed": false,
955                                "optional": false,
956                                "loc": {
957                                  "start": {
958                                    "line": 28,
959                                    "column": 35
960                                  },
961                                  "end": {
962                                    "line": 28,
963                                    "column": 42
964                                  }
965                                }
966                              },
967                              "arguments": [],
968                              "optional": false,
969                              "loc": {
970                                "start": {
971                                  "line": 28,
972                                  "column": 35
973                                },
974                                "end": {
975                                  "line": 28,
976                                  "column": 44
977                                }
978                              }
979                            },
980                            "typeAnnotation": {
981                              "type": "ETSTypeReference",
982                              "part": {
983                                "type": "ETSTypeReferencePart",
984                                "name": {
985                                  "type": "Identifier",
986                                  "name": "B",
987                                  "decorators": [],
988                                  "loc": {
989                                    "start": {
990                                      "line": 28,
991                                      "column": 48
992                                    },
993                                    "end": {
994                                      "line": 28,
995                                      "column": 49
996                                    }
997                                  }
998                                },
999                                "typeParams": {
1000                                  "type": "TSTypeParameterInstantiation",
1001                                  "params": [
1002                                    {
1003                                      "type": "ETSTypeReference",
1004                                      "part": {
1005                                        "type": "ETSTypeReferencePart",
1006                                        "name": {
1007                                          "type": "Identifier",
1008                                          "name": "Object",
1009                                          "decorators": [],
1010                                          "loc": {
1011                                            "start": {
1012                                              "line": 28,
1013                                              "column": 50
1014                                            },
1015                                            "end": {
1016                                              "line": 28,
1017                                              "column": 56
1018                                            }
1019                                          }
1020                                        },
1021                                        "loc": {
1022                                          "start": {
1023                                            "line": 28,
1024                                            "column": 50
1025                                          },
1026                                          "end": {
1027                                            "line": 28,
1028                                            "column": 57
1029                                          }
1030                                        }
1031                                      },
1032                                      "loc": {
1033                                        "start": {
1034                                          "line": 28,
1035                                          "column": 50
1036                                        },
1037                                        "end": {
1038                                          "line": 28,
1039                                          "column": 57
1040                                        }
1041                                      }
1042                                    }
1043                                  ],
1044                                  "loc": {
1045                                    "start": {
1046                                      "line": 28,
1047                                      "column": 49
1048                                    },
1049                                    "end": {
1050                                      "line": 28,
1051                                      "column": 57
1052                                    }
1053                                  }
1054                                },
1055                                "loc": {
1056                                  "start": {
1057                                    "line": 28,
1058                                    "column": 48
1059                                  },
1060                                  "end": {
1061                                    "line": 28,
1062                                    "column": 58
1063                                  }
1064                                }
1065                              },
1066                              "loc": {
1067                                "start": {
1068                                  "line": 28,
1069                                  "column": 48
1070                                },
1071                                "end": {
1072                                  "line": 28,
1073                                  "column": 58
1074                                }
1075                              }
1076                            },
1077                            "loc": {
1078                              "start": {
1079                                "line": 28,
1080                                "column": 35
1081                              },
1082                              "end": {
1083                                "line": 28,
1084                                "column": 44
1085                              }
1086                            }
1087                          },
1088                          "loc": {
1089                            "start": {
1090                              "line": 28,
1091                              "column": 13
1092                            },
1093                            "end": {
1094                              "line": 28,
1095                              "column": 44
1096                            }
1097                          }
1098                        }
1099                      ],
1100                      "kind": "let",
1101                      "loc": {
1102                        "start": {
1103                          "line": 28,
1104                          "column": 9
1105                        },
1106                        "end": {
1107                          "line": 28,
1108                          "column": 58
1109                        }
1110                      }
1111                    }
1112                  ],
1113                  "loc": {
1114                    "start": {
1115                      "line": 27,
1116                      "column": 38
1117                    },
1118                    "end": {
1119                      "line": 29,
1120                      "column": 6
1121                    }
1122                  }
1123                },
1124                "loc": {
1125                  "start": {
1126                    "line": 27,
1127                    "column": 15
1128                  },
1129                  "end": {
1130                    "line": 29,
1131                    "column": 6
1132                  }
1133                }
1134              },
1135              "loc": {
1136                "start": {
1137                  "line": 27,
1138                  "column": 15
1139                },
1140                "end": {
1141                  "line": 29,
1142                  "column": 6
1143                }
1144              }
1145            },
1146            "overloads": [],
1147            "decorators": [],
1148            "loc": {
1149              "start": {
1150                "line": 27,
1151                "column": 5
1152              },
1153              "end": {
1154                "line": 29,
1155                "column": 6
1156              }
1157            }
1158          },
1159          {
1160            "type": "MethodDefinition",
1161            "key": {
1162              "type": "Identifier",
1163              "name": "bar",
1164              "decorators": [],
1165              "loc": {
1166                "start": {
1167                  "line": 30,
1168                  "column": 13
1169                },
1170                "end": {
1171                  "line": 30,
1172                  "column": 16
1173                }
1174              }
1175            },
1176            "kind": "method",
1177            "accessibility": "private",
1178            "static": false,
1179            "optional": false,
1180            "computed": false,
1181            "value": {
1182              "type": "FunctionExpression",
1183              "function": {
1184                "type": "ScriptFunction",
1185                "id": {
1186                  "type": "Identifier",
1187                  "name": "bar",
1188                  "decorators": [],
1189                  "loc": {
1190                    "start": {
1191                      "line": 30,
1192                      "column": 13
1193                    },
1194                    "end": {
1195                      "line": 30,
1196                      "column": 16
1197                    }
1198                  }
1199                },
1200                "generator": false,
1201                "async": false,
1202                "expression": false,
1203                "params": [],
1204                "returnType": {
1205                  "type": "ETSPrimitiveType",
1206                  "loc": {
1207                    "start": {
1208                      "line": 30,
1209                      "column": 21
1210                    },
1211                    "end": {
1212                      "line": 30,
1213                      "column": 25
1214                    }
1215                  }
1216                },
1217                "body": {
1218                  "type": "BlockStatement",
1219                  "statements": [
1220                    {
1221                      "type": "VariableDeclaration",
1222                      "declarations": [
1223                        {
1224                          "type": "VariableDeclarator",
1225                          "id": {
1226                            "type": "Identifier",
1227                            "name": "ref",
1228                            "typeAnnotation": {
1229                              "type": "ETSTypeReference",
1230                              "part": {
1231                                "type": "ETSTypeReferencePart",
1232                                "name": {
1233                                  "type": "Identifier",
1234                                  "name": "B",
1235                                  "decorators": [],
1236                                  "loc": {
1237                                    "start": {
1238                                      "line": 31,
1239                                      "column": 18
1240                                    },
1241                                    "end": {
1242                                      "line": 31,
1243                                      "column": 19
1244                                    }
1245                                  }
1246                                },
1247                                "typeParams": {
1248                                  "type": "TSTypeParameterInstantiation",
1249                                  "params": [
1250                                    {
1251                                      "type": "ETSTypeReference",
1252                                      "part": {
1253                                        "type": "ETSTypeReferencePart",
1254                                        "name": {
1255                                          "type": "Identifier",
1256                                          "name": "Object",
1257                                          "decorators": [],
1258                                          "loc": {
1259                                            "start": {
1260                                              "line": 31,
1261                                              "column": 20
1262                                            },
1263                                            "end": {
1264                                              "line": 31,
1265                                              "column": 26
1266                                            }
1267                                          }
1268                                        },
1269                                        "loc": {
1270                                          "start": {
1271                                            "line": 31,
1272                                            "column": 20
1273                                          },
1274                                          "end": {
1275                                            "line": 31,
1276                                            "column": 27
1277                                          }
1278                                        }
1279                                      },
1280                                      "loc": {
1281                                        "start": {
1282                                          "line": 31,
1283                                          "column": 20
1284                                        },
1285                                        "end": {
1286                                          "line": 31,
1287                                          "column": 27
1288                                        }
1289                                      }
1290                                    }
1291                                  ],
1292                                  "loc": {
1293                                    "start": {
1294                                      "line": 31,
1295                                      "column": 19
1296                                    },
1297                                    "end": {
1298                                      "line": 31,
1299                                      "column": 27
1300                                    }
1301                                  }
1302                                },
1303                                "loc": {
1304                                  "start": {
1305                                    "line": 31,
1306                                    "column": 18
1307                                  },
1308                                  "end": {
1309                                    "line": 31,
1310                                    "column": 29
1311                                  }
1312                                }
1313                              },
1314                              "loc": {
1315                                "start": {
1316                                  "line": 31,
1317                                  "column": 18
1318                                },
1319                                "end": {
1320                                  "line": 31,
1321                                  "column": 29
1322                                }
1323                              }
1324                            },
1325                            "decorators": [],
1326                            "loc": {
1327                              "start": {
1328                                "line": 31,
1329                                "column": 13
1330                              },
1331                              "end": {
1332                                "line": 31,
1333                                "column": 16
1334                              }
1335                            }
1336                          },
1337                          "init": {
1338                            "type": "TSAsExpression",
1339                            "expression": {
1340                              "type": "CallExpression",
1341                              "callee": {
1342                                "type": "MemberExpression",
1343                                "object": {
1344                                  "type": "ThisExpression",
1345                                  "loc": {
1346                                    "start": {
1347                                      "line": 31,
1348                                      "column": 30
1349                                    },
1350                                    "end": {
1351                                      "line": 31,
1352                                      "column": 34
1353                                    }
1354                                  }
1355                                },
1356                                "property": {
1357                                  "type": "Identifier",
1358                                  "name": "f2",
1359                                  "decorators": [],
1360                                  "loc": {
1361                                    "start": {
1362                                      "line": 31,
1363                                      "column": 35
1364                                    },
1365                                    "end": {
1366                                      "line": 31,
1367                                      "column": 37
1368                                    }
1369                                  }
1370                                },
1371                                "computed": false,
1372                                "optional": false,
1373                                "loc": {
1374                                  "start": {
1375                                    "line": 31,
1376                                    "column": 30
1377                                  },
1378                                  "end": {
1379                                    "line": 31,
1380                                    "column": 37
1381                                  }
1382                                }
1383                              },
1384                              "arguments": [],
1385                              "optional": false,
1386                              "loc": {
1387                                "start": {
1388                                  "line": 31,
1389                                  "column": 30
1390                                },
1391                                "end": {
1392                                  "line": 31,
1393                                  "column": 39
1394                                }
1395                              }
1396                            },
1397                            "typeAnnotation": {
1398                              "type": "ETSTypeReference",
1399                              "part": {
1400                                "type": "ETSTypeReferencePart",
1401                                "name": {
1402                                  "type": "Identifier",
1403                                  "name": "B",
1404                                  "decorators": [],
1405                                  "loc": {
1406                                    "start": {
1407                                      "line": 31,
1408                                      "column": 43
1409                                    },
1410                                    "end": {
1411                                      "line": 31,
1412                                      "column": 44
1413                                    }
1414                                  }
1415                                },
1416                                "typeParams": {
1417                                  "type": "TSTypeParameterInstantiation",
1418                                  "params": [
1419                                    {
1420                                      "type": "ETSTypeReference",
1421                                      "part": {
1422                                        "type": "ETSTypeReferencePart",
1423                                        "name": {
1424                                          "type": "Identifier",
1425                                          "name": "Object",
1426                                          "decorators": [],
1427                                          "loc": {
1428                                            "start": {
1429                                              "line": 31,
1430                                              "column": 45
1431                                            },
1432                                            "end": {
1433                                              "line": 31,
1434                                              "column": 51
1435                                            }
1436                                          }
1437                                        },
1438                                        "loc": {
1439                                          "start": {
1440                                            "line": 31,
1441                                            "column": 45
1442                                          },
1443                                          "end": {
1444                                            "line": 31,
1445                                            "column": 52
1446                                          }
1447                                        }
1448                                      },
1449                                      "loc": {
1450                                        "start": {
1451                                          "line": 31,
1452                                          "column": 45
1453                                        },
1454                                        "end": {
1455                                          "line": 31,
1456                                          "column": 52
1457                                        }
1458                                      }
1459                                    }
1460                                  ],
1461                                  "loc": {
1462                                    "start": {
1463                                      "line": 31,
1464                                      "column": 44
1465                                    },
1466                                    "end": {
1467                                      "line": 31,
1468                                      "column": 52
1469                                    }
1470                                  }
1471                                },
1472                                "loc": {
1473                                  "start": {
1474                                    "line": 31,
1475                                    "column": 43
1476                                  },
1477                                  "end": {
1478                                    "line": 31,
1479                                    "column": 53
1480                                  }
1481                                }
1482                              },
1483                              "loc": {
1484                                "start": {
1485                                  "line": 31,
1486                                  "column": 43
1487                                },
1488                                "end": {
1489                                  "line": 31,
1490                                  "column": 53
1491                                }
1492                              }
1493                            },
1494                            "loc": {
1495                              "start": {
1496                                "line": 31,
1497                                "column": 30
1498                              },
1499                              "end": {
1500                                "line": 31,
1501                                "column": 39
1502                              }
1503                            }
1504                          },
1505                          "loc": {
1506                            "start": {
1507                              "line": 31,
1508                              "column": 13
1509                            },
1510                            "end": {
1511                              "line": 31,
1512                              "column": 39
1513                            }
1514                          }
1515                        }
1516                      ],
1517                      "kind": "let",
1518                      "loc": {
1519                        "start": {
1520                          "line": 31,
1521                          "column": 9
1522                        },
1523                        "end": {
1524                          "line": 31,
1525                          "column": 53
1526                        }
1527                      }
1528                    },
1529                    {
1530                      "type": "IfStatement",
1531                      "test": {
1532                        "type": "BinaryExpression",
1533                        "operator": "==",
1534                        "left": {
1535                          "type": "CallExpression",
1536                          "callee": {
1537                            "type": "MemberExpression",
1538                            "object": {
1539                              "type": "Identifier",
1540                              "name": "ref",
1541                              "decorators": [],
1542                              "loc": {
1543                                "start": {
1544                                  "line": 32,
1545                                  "column": 13
1546                                },
1547                                "end": {
1548                                  "line": 32,
1549                                  "column": 16
1550                                }
1551                              }
1552                            },
1553                            "property": {
1554                              "type": "Identifier",
1555                              "name": "f1",
1556                              "decorators": [],
1557                              "loc": {
1558                                "start": {
1559                                  "line": 32,
1560                                  "column": 17
1561                                },
1562                                "end": {
1563                                  "line": 32,
1564                                  "column": 19
1565                                }
1566                              }
1567                            },
1568                            "computed": false,
1569                            "optional": false,
1570                            "loc": {
1571                              "start": {
1572                                "line": 32,
1573                                "column": 13
1574                              },
1575                              "end": {
1576                                "line": 32,
1577                                "column": 19
1578                              }
1579                            }
1580                          },
1581                          "arguments": [],
1582                          "optional": false,
1583                          "loc": {
1584                            "start": {
1585                              "line": 32,
1586                              "column": 13
1587                            },
1588                            "end": {
1589                              "line": 32,
1590                              "column": 21
1591                            }
1592                          }
1593                        },
1594                        "right": {
1595                          "type": "NullLiteral",
1596                          "value": null,
1597                          "loc": {
1598                            "start": {
1599                              "line": 32,
1600                              "column": 25
1601                            },
1602                            "end": {
1603                              "line": 32,
1604                              "column": 29
1605                            }
1606                          }
1607                        },
1608                        "loc": {
1609                          "start": {
1610                            "line": 32,
1611                            "column": 13
1612                          },
1613                          "end": {
1614                            "line": 32,
1615                            "column": 29
1616                          }
1617                        }
1618                      },
1619                      "consequent": {
1620                        "type": "BlockStatement",
1621                        "statements": [],
1622                        "loc": {
1623                          "start": {
1624                            "line": 32,
1625                            "column": 31
1626                          },
1627                          "end": {
1628                            "line": 32,
1629                            "column": 33
1630                          }
1631                        }
1632                      },
1633                      "alternate": null,
1634                      "loc": {
1635                        "start": {
1636                          "line": 32,
1637                          "column": 9
1638                        },
1639                        "end": {
1640                          "line": 32,
1641                          "column": 33
1642                        }
1643                      }
1644                    }
1645                  ],
1646                  "loc": {
1647                    "start": {
1648                      "line": 30,
1649                      "column": 26
1650                    },
1651                    "end": {
1652                      "line": 33,
1653                      "column": 6
1654                    }
1655                  }
1656                },
1657                "loc": {
1658                  "start": {
1659                    "line": 30,
1660                    "column": 16
1661                  },
1662                  "end": {
1663                    "line": 33,
1664                    "column": 6
1665                  }
1666                }
1667              },
1668              "loc": {
1669                "start": {
1670                  "line": 30,
1671                  "column": 16
1672                },
1673                "end": {
1674                  "line": 33,
1675                  "column": 6
1676                }
1677              }
1678            },
1679            "overloads": [],
1680            "decorators": [],
1681            "loc": {
1682              "start": {
1683                "line": 30,
1684                "column": 5
1685              },
1686              "end": {
1687                "line": 33,
1688                "column": 6
1689              }
1690            }
1691          },
1692          {
1693            "type": "MethodDefinition",
1694            "key": {
1695              "type": "Identifier",
1696              "name": "f2",
1697              "decorators": [],
1698              "loc": {
1699                "start": {
1700                  "line": 35,
1701                  "column": 13
1702                },
1703                "end": {
1704                  "line": 35,
1705                  "column": 15
1706                }
1707              }
1708            },
1709            "kind": "method",
1710            "accessibility": "private",
1711            "static": false,
1712            "optional": false,
1713            "computed": false,
1714            "value": {
1715              "type": "FunctionExpression",
1716              "function": {
1717                "type": "ScriptFunction",
1718                "id": {
1719                  "type": "Identifier",
1720                  "name": "f2",
1721                  "decorators": [],
1722                  "loc": {
1723                    "start": {
1724                      "line": 35,
1725                      "column": 13
1726                    },
1727                    "end": {
1728                      "line": 35,
1729                      "column": 15
1730                    }
1731                  }
1732                },
1733                "generator": false,
1734                "async": false,
1735                "expression": false,
1736                "params": [],
1737                "returnType": {
1738                  "type": "ETSTypeReference",
1739                  "part": {
1740                    "type": "ETSTypeReferencePart",
1741                    "name": {
1742                      "type": "Identifier",
1743                      "name": "Object",
1744                      "decorators": [],
1745                      "loc": {
1746                        "start": {
1747                          "line": 35,
1748                          "column": 20
1749                        },
1750                        "end": {
1751                          "line": 35,
1752                          "column": 26
1753                        }
1754                      }
1755                    },
1756                    "loc": {
1757                      "start": {
1758                        "line": 35,
1759                        "column": 20
1760                      },
1761                      "end": {
1762                        "line": 35,
1763                        "column": 28
1764                      }
1765                    }
1766                  },
1767                  "loc": {
1768                    "start": {
1769                      "line": 35,
1770                      "column": 20
1771                    },
1772                    "end": {
1773                      "line": 35,
1774                      "column": 28
1775                    }
1776                  }
1777                },
1778                "body": {
1779                  "type": "BlockStatement",
1780                  "statements": [
1781                    {
1782                      "type": "ReturnStatement",
1783                      "argument": {
1784                        "type": "ETSNewClassInstanceExpression",
1785                        "typeReference": {
1786                          "type": "ETSTypeReference",
1787                          "part": {
1788                            "type": "ETSTypeReferencePart",
1789                            "name": {
1790                              "type": "Identifier",
1791                              "name": "Object",
1792                              "decorators": [],
1793                              "loc": {
1794                                "start": {
1795                                  "line": 35,
1796                                  "column": 40
1797                                },
1798                                "end": {
1799                                  "line": 35,
1800                                  "column": 46
1801                                }
1802                              }
1803                            },
1804                            "loc": {
1805                              "start": {
1806                                "line": 35,
1807                                "column": 40
1808                              },
1809                              "end": {
1810                                "line": 35,
1811                                "column": 47
1812                              }
1813                            }
1814                          },
1815                          "loc": {
1816                            "start": {
1817                              "line": 35,
1818                              "column": 40
1819                            },
1820                            "end": {
1821                              "line": 35,
1822                              "column": 47
1823                            }
1824                          }
1825                        },
1826                        "arguments": [],
1827                        "loc": {
1828                          "start": {
1829                            "line": 35,
1830                            "column": 36
1831                          },
1832                          "end": {
1833                            "line": 35,
1834                            "column": 49
1835                          }
1836                        }
1837                      },
1838                      "loc": {
1839                        "start": {
1840                          "line": 35,
1841                          "column": 29
1842                        },
1843                        "end": {
1844                          "line": 35,
1845                          "column": 49
1846                        }
1847                      }
1848                    }
1849                  ],
1850                  "loc": {
1851                    "start": {
1852                      "line": 35,
1853                      "column": 27
1854                    },
1855                    "end": {
1856                      "line": 35,
1857                      "column": 51
1858                    }
1859                  }
1860                },
1861                "loc": {
1862                  "start": {
1863                    "line": 35,
1864                    "column": 15
1865                  },
1866                  "end": {
1867                    "line": 35,
1868                    "column": 51
1869                  }
1870                }
1871              },
1872              "loc": {
1873                "start": {
1874                  "line": 35,
1875                  "column": 15
1876                },
1877                "end": {
1878                  "line": 35,
1879                  "column": 51
1880                }
1881              }
1882            },
1883            "overloads": [],
1884            "decorators": [],
1885            "loc": {
1886              "start": {
1887                "line": 35,
1888                "column": 5
1889              },
1890              "end": {
1891                "line": 35,
1892                "column": 51
1893              }
1894            }
1895          },
1896          {
1897            "type": "MethodDefinition",
1898            "key": {
1899              "type": "Identifier",
1900              "name": "constructor",
1901              "decorators": [],
1902              "loc": {
1903                "start": {
1904                  "line": 1,
1905                  "column": 1
1906                },
1907                "end": {
1908                  "line": 1,
1909                  "column": 1
1910                }
1911              }
1912            },
1913            "kind": "constructor",
1914            "static": false,
1915            "optional": false,
1916            "computed": false,
1917            "value": {
1918              "type": "FunctionExpression",
1919              "function": {
1920                "type": "ScriptFunction",
1921                "id": {
1922                  "type": "Identifier",
1923                  "name": "constructor",
1924                  "decorators": [],
1925                  "loc": {
1926                    "start": {
1927                      "line": 1,
1928                      "column": 1
1929                    },
1930                    "end": {
1931                      "line": 1,
1932                      "column": 1
1933                    }
1934                  }
1935                },
1936                "generator": false,
1937                "async": false,
1938                "expression": false,
1939                "params": [],
1940                "body": {
1941                  "type": "BlockStatement",
1942                  "statements": [],
1943                  "loc": {
1944                    "start": {
1945                      "line": 1,
1946                      "column": 1
1947                    },
1948                    "end": {
1949                      "line": 1,
1950                      "column": 1
1951                    }
1952                  }
1953                },
1954                "loc": {
1955                  "start": {
1956                    "line": 1,
1957                    "column": 1
1958                  },
1959                  "end": {
1960                    "line": 1,
1961                    "column": 1
1962                  }
1963                }
1964              },
1965              "loc": {
1966                "start": {
1967                  "line": 1,
1968                  "column": 1
1969                },
1970                "end": {
1971                  "line": 1,
1972                  "column": 1
1973                }
1974              }
1975            },
1976            "overloads": [],
1977            "decorators": [],
1978            "loc": {
1979              "start": {
1980                "line": 36,
1981                "column": 2
1982              },
1983              "end": {
1984                "line": 36,
1985                "column": 2
1986              }
1987            }
1988          }
1989        ],
1990        "loc": {
1991          "start": {
1992            "line": 26,
1993            "column": 9
1994          },
1995          "end": {
1996            "line": 36,
1997            "column": 2
1998          }
1999        }
2000      },
2001      "loc": {
2002        "start": {
2003          "line": 26,
2004          "column": 1
2005        },
2006        "end": {
2007          "line": 36,
2008          "column": 2
2009        }
2010      }
2011    },
2012    {
2013      "type": "ClassDeclaration",
2014      "definition": {
2015        "id": {
2016          "type": "Identifier",
2017          "name": "ETSGLOBAL",
2018          "decorators": [],
2019          "loc": {
2020            "start": {
2021              "line": 1,
2022              "column": 1
2023            },
2024            "end": {
2025              "line": 1,
2026              "column": 1
2027            }
2028          }
2029        },
2030        "superClass": null,
2031        "implements": [],
2032        "body": [
2033          {
2034            "type": "MethodDefinition",
2035            "key": {
2036              "type": "Identifier",
2037              "name": "_$init$_",
2038              "decorators": [],
2039              "loc": {
2040                "start": {
2041                  "line": 1,
2042                  "column": 1
2043                },
2044                "end": {
2045                  "line": 1,
2046                  "column": 1
2047                }
2048              }
2049            },
2050            "kind": "method",
2051            "accessibility": "public",
2052            "static": true,
2053            "optional": false,
2054            "computed": false,
2055            "value": {
2056              "type": "FunctionExpression",
2057              "function": {
2058                "type": "ScriptFunction",
2059                "id": {
2060                  "type": "Identifier",
2061                  "name": "_$init$_",
2062                  "decorators": [],
2063                  "loc": {
2064                    "start": {
2065                      "line": 1,
2066                      "column": 1
2067                    },
2068                    "end": {
2069                      "line": 1,
2070                      "column": 1
2071                    }
2072                  }
2073                },
2074                "generator": false,
2075                "async": false,
2076                "expression": false,
2077                "params": [],
2078                "body": {
2079                  "type": "BlockStatement",
2080                  "statements": [],
2081                  "loc": {
2082                    "start": {
2083                      "line": 1,
2084                      "column": 1
2085                    },
2086                    "end": {
2087                      "line": 1,
2088                      "column": 1
2089                    }
2090                  }
2091                },
2092                "loc": {
2093                  "start": {
2094                    "line": 1,
2095                    "column": 1
2096                  },
2097                  "end": {
2098                    "line": 1,
2099                    "column": 1
2100                  }
2101                }
2102              },
2103              "loc": {
2104                "start": {
2105                  "line": 1,
2106                  "column": 1
2107                },
2108                "end": {
2109                  "line": 1,
2110                  "column": 1
2111                }
2112              }
2113            },
2114            "overloads": [],
2115            "decorators": [],
2116            "loc": {
2117              "start": {
2118                "line": 1,
2119                "column": 1
2120              },
2121              "end": {
2122                "line": 1,
2123                "column": 1
2124              }
2125            }
2126          }
2127        ],
2128        "loc": {
2129          "start": {
2130            "line": 1,
2131            "column": 1
2132          },
2133          "end": {
2134            "line": 1,
2135            "column": 1
2136          }
2137        }
2138      },
2139      "loc": {
2140        "start": {
2141          "line": 1,
2142          "column": 1
2143        },
2144        "end": {
2145          "line": 1,
2146          "column": 1
2147        }
2148      }
2149    }
2150  ],
2151  "loc": {
2152    "start": {
2153      "line": 1,
2154      "column": 1
2155    },
2156    "end": {
2157      "line": 37,
2158      "column": 1
2159    }
2160  }
2161}
2162