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