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