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