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