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