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