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