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 "accessibility": "private", 363 "static": false, 364 "readonly": false, 365 "declare": false, 366 "optional": false, 367 "computed": false, 368 "typeAnnotation": { 369 "type": "ETSTypeReference", 370 "part": { 371 "type": "ETSTypeReferencePart", 372 "name": { 373 "type": "Identifier", 374 "name": "Object", 375 "decorators": [], 376 "loc": { 377 "start": { 378 "line": 20, 379 "column": 18 380 }, 381 "end": { 382 "line": 20, 383 "column": 24 384 } 385 } 386 }, 387 "loc": { 388 "start": { 389 "line": 20, 390 "column": 18 391 }, 392 "end": { 393 "line": 20, 394 "column": 25 395 } 396 } 397 }, 398 "loc": { 399 "start": { 400 "line": 20, 401 "column": 18 402 }, 403 "end": { 404 "line": 20, 405 "column": 25 406 } 407 } 408 }, 409 "definite": false, 410 "decorators": [], 411 "loc": { 412 "start": { 413 "line": 20, 414 "column": 13 415 }, 416 "end": { 417 "line": 20, 418 "column": 25 419 } 420 } 421 } 422 ], 423 "loc": { 424 "start": { 425 "line": 16, 426 "column": 12 427 }, 428 "end": { 429 "line": 21, 430 "column": 2 431 } 432 } 433 }, 434 "loc": { 435 "start": { 436 "line": 16, 437 "column": 1 438 }, 439 "end": { 440 "line": 21, 441 "column": 2 442 } 443 } 444 }, 445 { 446 "type": "ClassDeclaration", 447 "definition": { 448 "id": { 449 "type": "Identifier", 450 "name": "ETSGLOBAL", 451 "decorators": [], 452 "loc": { 453 "start": { 454 "line": 1, 455 "column": 1 456 }, 457 "end": { 458 "line": 1, 459 "column": 1 460 } 461 } 462 }, 463 "superClass": null, 464 "implements": [], 465 "body": [ 466 { 467 "type": "MethodDefinition", 468 "key": { 469 "type": "Identifier", 470 "name": "_$init$_", 471 "decorators": [], 472 "loc": { 473 "start": { 474 "line": 1, 475 "column": 1 476 }, 477 "end": { 478 "line": 1, 479 "column": 1 480 } 481 } 482 }, 483 "kind": "method", 484 "accessibility": "public", 485 "static": true, 486 "optional": false, 487 "computed": false, 488 "value": { 489 "type": "FunctionExpression", 490 "function": { 491 "type": "ScriptFunction", 492 "id": { 493 "type": "Identifier", 494 "name": "_$init$_", 495 "decorators": [], 496 "loc": { 497 "start": { 498 "line": 1, 499 "column": 1 500 }, 501 "end": { 502 "line": 1, 503 "column": 1 504 } 505 } 506 }, 507 "generator": false, 508 "async": false, 509 "expression": false, 510 "params": [], 511 "body": { 512 "type": "BlockStatement", 513 "statements": [], 514 "loc": { 515 "start": { 516 "line": 1, 517 "column": 1 518 }, 519 "end": { 520 "line": 1, 521 "column": 1 522 } 523 } 524 }, 525 "loc": { 526 "start": { 527 "line": 1, 528 "column": 1 529 }, 530 "end": { 531 "line": 1, 532 "column": 1 533 } 534 } 535 }, 536 "loc": { 537 "start": { 538 "line": 1, 539 "column": 1 540 }, 541 "end": { 542 "line": 1, 543 "column": 1 544 } 545 } 546 }, 547 "overloads": [], 548 "decorators": [], 549 "loc": { 550 "start": { 551 "line": 1, 552 "column": 1 553 }, 554 "end": { 555 "line": 1, 556 "column": 1 557 } 558 } 559 }, 560 { 561 "type": "MethodDefinition", 562 "key": { 563 "type": "Identifier", 564 "name": "foo", 565 "decorators": [], 566 "loc": { 567 "start": { 568 "line": 23, 569 "column": 10 570 }, 571 "end": { 572 "line": 23, 573 "column": 13 574 } 575 } 576 }, 577 "kind": "method", 578 "accessibility": "public", 579 "static": true, 580 "optional": false, 581 "computed": false, 582 "value": { 583 "type": "FunctionExpression", 584 "function": { 585 "type": "ScriptFunction", 586 "id": { 587 "type": "Identifier", 588 "name": "foo", 589 "decorators": [], 590 "loc": { 591 "start": { 592 "line": 23, 593 "column": 10 594 }, 595 "end": { 596 "line": 23, 597 "column": 13 598 } 599 } 600 }, 601 "generator": false, 602 "async": false, 603 "expression": false, 604 "params": [], 605 "returnType": { 606 "type": "ETSTypeReference", 607 "part": { 608 "type": "ETSTypeReferencePart", 609 "name": { 610 "type": "Identifier", 611 "name": "P", 612 "decorators": [], 613 "loc": { 614 "start": { 615 "line": 23, 616 "column": 17 617 }, 618 "end": { 619 "line": 23, 620 "column": 18 621 } 622 } 623 }, 624 "typeParams": { 625 "type": "TSTypeParameterInstantiation", 626 "params": [ 627 { 628 "type": "ETSTypeReference", 629 "part": { 630 "type": "ETSTypeReferencePart", 631 "name": { 632 "type": "Identifier", 633 "name": "Object", 634 "decorators": [], 635 "loc": { 636 "start": { 637 "line": 23, 638 "column": 19 639 }, 640 "end": { 641 "line": 23, 642 "column": 25 643 } 644 } 645 }, 646 "loc": { 647 "start": { 648 "line": 23, 649 "column": 19 650 }, 651 "end": { 652 "line": 23, 653 "column": 26 654 } 655 } 656 }, 657 "loc": { 658 "start": { 659 "line": 23, 660 "column": 19 661 }, 662 "end": { 663 "line": 23, 664 "column": 26 665 } 666 } 667 } 668 ], 669 "loc": { 670 "start": { 671 "line": 23, 672 "column": 18 673 }, 674 "end": { 675 "line": 23, 676 "column": 26 677 } 678 } 679 }, 680 "loc": { 681 "start": { 682 "line": 23, 683 "column": 17 684 }, 685 "end": { 686 "line": 23, 687 "column": 28 688 } 689 } 690 }, 691 "loc": { 692 "start": { 693 "line": 23, 694 "column": 17 695 }, 696 "end": { 697 "line": 23, 698 "column": 28 699 } 700 } 701 }, 702 "body": { 703 "type": "BlockStatement", 704 "statements": [ 705 { 706 "type": "ReturnStatement", 707 "argument": { 708 "type": "ETSNewClassInstanceExpression", 709 "typeReference": { 710 "type": "ETSTypeReference", 711 "part": { 712 "type": "ETSTypeReferencePart", 713 "name": { 714 "type": "Identifier", 715 "name": "P", 716 "decorators": [], 717 "loc": { 718 "start": { 719 "line": 24, 720 "column": 16 721 }, 722 "end": { 723 "line": 24, 724 "column": 17 725 } 726 } 727 }, 728 "typeParams": { 729 "type": "TSTypeParameterInstantiation", 730 "params": [ 731 { 732 "type": "ETSTypeReference", 733 "part": { 734 "type": "ETSTypeReferencePart", 735 "name": { 736 "type": "Identifier", 737 "name": "Object", 738 "decorators": [], 739 "loc": { 740 "start": { 741 "line": 24, 742 "column": 18 743 }, 744 "end": { 745 "line": 24, 746 "column": 24 747 } 748 } 749 }, 750 "loc": { 751 "start": { 752 "line": 24, 753 "column": 18 754 }, 755 "end": { 756 "line": 24, 757 "column": 25 758 } 759 } 760 }, 761 "loc": { 762 "start": { 763 "line": 24, 764 "column": 18 765 }, 766 "end": { 767 "line": 24, 768 "column": 25 769 } 770 } 771 } 772 ], 773 "loc": { 774 "start": { 775 "line": 24, 776 "column": 17 777 }, 778 "end": { 779 "line": 24, 780 "column": 25 781 } 782 } 783 }, 784 "loc": { 785 "start": { 786 "line": 24, 787 "column": 16 788 }, 789 "end": { 790 "line": 24, 791 "column": 26 792 } 793 } 794 }, 795 "loc": { 796 "start": { 797 "line": 24, 798 "column": 16 799 }, 800 "end": { 801 "line": 24, 802 "column": 26 803 } 804 } 805 }, 806 "arguments": [ 807 { 808 "type": "ArrowFunctionExpression", 809 "function": { 810 "type": "ScriptFunction", 811 "id": null, 812 "generator": false, 813 "async": false, 814 "expression": false, 815 "params": [ 816 { 817 "type": "ETSParameterExpression", 818 "name": { 819 "type": "Identifier", 820 "name": "resolve", 821 "typeAnnotation": { 822 "type": "ETSFunctionType", 823 "params": [ 824 { 825 "type": "ETSParameterExpression", 826 "name": { 827 "type": "Identifier", 828 "name": "obj", 829 "typeAnnotation": { 830 "type": "ETSTypeReference", 831 "part": { 832 "type": "ETSTypeReferencePart", 833 "name": { 834 "type": "Identifier", 835 "name": "Object", 836 "decorators": [], 837 "loc": { 838 "start": { 839 "line": 24, 840 "column": 42 841 }, 842 "end": { 843 "line": 24, 844 "column": 48 845 } 846 } 847 }, 848 "loc": { 849 "start": { 850 "line": 24, 851 "column": 42 852 }, 853 "end": { 854 "line": 24, 855 "column": 49 856 } 857 } 858 }, 859 "loc": { 860 "start": { 861 "line": 24, 862 "column": 42 863 }, 864 "end": { 865 "line": 24, 866 "column": 49 867 } 868 } 869 }, 870 "decorators": [], 871 "loc": { 872 "start": { 873 "line": 24, 874 "column": 37 875 }, 876 "end": { 877 "line": 24, 878 "column": 49 879 } 880 } 881 }, 882 "loc": { 883 "start": { 884 "line": 24, 885 "column": 37 886 }, 887 "end": { 888 "line": 24, 889 "column": 49 890 } 891 } 892 } 893 ], 894 "returnType": { 895 "type": "ETSPrimitiveType", 896 "loc": { 897 "start": { 898 "line": 24, 899 "column": 53 900 }, 901 "end": { 902 "line": 24, 903 "column": 57 904 } 905 } 906 }, 907 "loc": { 908 "start": { 909 "line": 24, 910 "column": 36 911 }, 912 "end": { 913 "line": 24, 914 "column": 57 915 } 916 } 917 }, 918 "decorators": [], 919 "loc": { 920 "start": { 921 "line": 24, 922 "column": 27 923 }, 924 "end": { 925 "line": 24, 926 "column": 57 927 } 928 } 929 }, 930 "loc": { 931 "start": { 932 "line": 24, 933 "column": 27 934 }, 935 "end": { 936 "line": 24, 937 "column": 57 938 } 939 } 940 } 941 ], 942 "returnType": { 943 "type": "ETSPrimitiveType", 944 "loc": { 945 "start": { 946 "line": 24, 947 "column": 60 948 }, 949 "end": { 950 "line": 24, 951 "column": 64 952 } 953 } 954 }, 955 "body": { 956 "type": "BlockStatement", 957 "statements": [ 958 { 959 "type": "ExpressionStatement", 960 "expression": { 961 "type": "CallExpression", 962 "callee": { 963 "type": "Identifier", 964 "name": "resolve", 965 "decorators": [], 966 "loc": { 967 "start": { 968 "line": 25, 969 "column": 9 970 }, 971 "end": { 972 "line": 25, 973 "column": 16 974 } 975 } 976 }, 977 "arguments": [ 978 { 979 "type": "StringLiteral", 980 "value": "resolved", 981 "loc": { 982 "start": { 983 "line": 25, 984 "column": 17 985 }, 986 "end": { 987 "line": 25, 988 "column": 27 989 } 990 } 991 } 992 ], 993 "optional": false, 994 "loc": { 995 "start": { 996 "line": 25, 997 "column": 9 998 }, 999 "end": { 1000 "line": 25, 1001 "column": 28 1002 } 1003 } 1004 }, 1005 "loc": { 1006 "start": { 1007 "line": 25, 1008 "column": 9 1009 }, 1010 "end": { 1011 "line": 25, 1012 "column": 29 1013 } 1014 } 1015 } 1016 ], 1017 "loc": { 1018 "start": { 1019 "line": 24, 1020 "column": 68 1021 }, 1022 "end": { 1023 "line": 26, 1024 "column": 6 1025 } 1026 } 1027 }, 1028 "loc": { 1029 "start": { 1030 "line": 24, 1031 "column": 26 1032 }, 1033 "end": { 1034 "line": 26, 1035 "column": 6 1036 } 1037 } 1038 }, 1039 "loc": { 1040 "start": { 1041 "line": 24, 1042 "column": 26 1043 }, 1044 "end": { 1045 "line": 26, 1046 "column": 6 1047 } 1048 } 1049 } 1050 ], 1051 "loc": { 1052 "start": { 1053 "line": 24, 1054 "column": 12 1055 }, 1056 "end": { 1057 "line": 26, 1058 "column": 8 1059 } 1060 } 1061 }, 1062 "loc": { 1063 "start": { 1064 "line": 24, 1065 "column": 5 1066 }, 1067 "end": { 1068 "line": 26, 1069 "column": 8 1070 } 1071 } 1072 } 1073 ], 1074 "loc": { 1075 "start": { 1076 "line": 23, 1077 "column": 27 1078 }, 1079 "end": { 1080 "line": 27, 1081 "column": 2 1082 } 1083 } 1084 }, 1085 "loc": { 1086 "start": { 1087 "line": 23, 1088 "column": 13 1089 }, 1090 "end": { 1091 "line": 27, 1092 "column": 2 1093 } 1094 } 1095 }, 1096 "loc": { 1097 "start": { 1098 "line": 23, 1099 "column": 13 1100 }, 1101 "end": { 1102 "line": 27, 1103 "column": 2 1104 } 1105 } 1106 }, 1107 "overloads": [], 1108 "decorators": [], 1109 "loc": { 1110 "start": { 1111 "line": 23, 1112 "column": 1 1113 }, 1114 "end": { 1115 "line": 27, 1116 "column": 2 1117 } 1118 } 1119 } 1120 ], 1121 "loc": { 1122 "start": { 1123 "line": 1, 1124 "column": 1 1125 }, 1126 "end": { 1127 "line": 1, 1128 "column": 1 1129 } 1130 } 1131 }, 1132 "loc": { 1133 "start": { 1134 "line": 1, 1135 "column": 1 1136 }, 1137 "end": { 1138 "line": 1, 1139 "column": 1 1140 } 1141 } 1142 } 1143 ], 1144 "loc": { 1145 "start": { 1146 "line": 1, 1147 "column": 1 1148 }, 1149 "end": { 1150 "line": 28, 1151 "column": 1 1152 } 1153 } 1154} 1155