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