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