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": "ETSPrimitiveType", 809 "loc": { 810 "start": { 811 "line": 32, 812 "column": 18 813 }, 814 "end": { 815 "line": 32, 816 "column": 22 817 } 818 } 819 }, 820 "body": { 821 "type": "BlockStatement", 822 "statements": [ 823 { 824 "type": "ExpressionStatement", 825 "expression": { 826 "type": "CallExpression", 827 "callee": { 828 "type": "MemberExpression", 829 "object": { 830 "type": "Identifier", 831 "name": "I", 832 "decorators": [], 833 "loc": { 834 "start": { 835 "line": 33, 836 "column": 5 837 }, 838 "end": { 839 "line": 33, 840 "column": 6 841 } 842 } 843 }, 844 "property": { 845 "type": "Identifier", 846 "name": "xyz", 847 "decorators": [], 848 "loc": { 849 "start": { 850 "line": 33, 851 "column": 7 852 }, 853 "end": { 854 "line": 33, 855 "column": 10 856 } 857 } 858 }, 859 "computed": false, 860 "optional": false, 861 "loc": { 862 "start": { 863 "line": 33, 864 "column": 5 865 }, 866 "end": { 867 "line": 33, 868 "column": 10 869 } 870 } 871 }, 872 "arguments": [], 873 "optional": false, 874 "loc": { 875 "start": { 876 "line": 33, 877 "column": 5 878 }, 879 "end": { 880 "line": 33, 881 "column": 12 882 } 883 } 884 }, 885 "loc": { 886 "start": { 887 "line": 33, 888 "column": 5 889 }, 890 "end": { 891 "line": 33, 892 "column": 13 893 } 894 } 895 }, 896 { 897 "type": "VariableDeclaration", 898 "declarations": [ 899 { 900 "type": "VariableDeclarator", 901 "id": { 902 "type": "Identifier", 903 "name": "i", 904 "typeAnnotation": { 905 "type": "ETSTypeReference", 906 "part": { 907 "type": "ETSTypeReferencePart", 908 "name": { 909 "type": "Identifier", 910 "name": "I", 911 "decorators": [], 912 "loc": { 913 "start": { 914 "line": 34, 915 "column": 12 916 }, 917 "end": { 918 "line": 34, 919 "column": 13 920 } 921 } 922 }, 923 "loc": { 924 "start": { 925 "line": 34, 926 "column": 12 927 }, 928 "end": { 929 "line": 34, 930 "column": 15 931 } 932 } 933 }, 934 "loc": { 935 "start": { 936 "line": 34, 937 "column": 12 938 }, 939 "end": { 940 "line": 34, 941 "column": 15 942 } 943 } 944 }, 945 "decorators": [], 946 "loc": { 947 "start": { 948 "line": 34, 949 "column": 9 950 }, 951 "end": { 952 "line": 34, 953 "column": 10 954 } 955 } 956 }, 957 "init": { 958 "type": "ETSNewClassInstanceExpression", 959 "typeReference": { 960 "type": "ETSTypeReference", 961 "part": { 962 "type": "ETSTypeReferencePart", 963 "name": { 964 "type": "Identifier", 965 "name": "C", 966 "decorators": [], 967 "loc": { 968 "start": { 969 "line": 34, 970 "column": 20 971 }, 972 "end": { 973 "line": 34, 974 "column": 21 975 } 976 } 977 }, 978 "loc": { 979 "start": { 980 "line": 34, 981 "column": 20 982 }, 983 "end": { 984 "line": 34, 985 "column": 22 986 } 987 } 988 }, 989 "loc": { 990 "start": { 991 "line": 34, 992 "column": 20 993 }, 994 "end": { 995 "line": 34, 996 "column": 22 997 } 998 } 999 }, 1000 "arguments": [], 1001 "loc": { 1002 "start": { 1003 "line": 34, 1004 "column": 16 1005 }, 1006 "end": { 1007 "line": 34, 1008 "column": 24 1009 } 1010 } 1011 }, 1012 "loc": { 1013 "start": { 1014 "line": 34, 1015 "column": 9 1016 }, 1017 "end": { 1018 "line": 34, 1019 "column": 24 1020 } 1021 } 1022 } 1023 ], 1024 "kind": "let", 1025 "loc": { 1026 "start": { 1027 "line": 34, 1028 "column": 5 1029 }, 1030 "end": { 1031 "line": 34, 1032 "column": 24 1033 } 1034 } 1035 }, 1036 { 1037 "type": "ExpressionStatement", 1038 "expression": { 1039 "type": "CallExpression", 1040 "callee": { 1041 "type": "MemberExpression", 1042 "object": { 1043 "type": "Identifier", 1044 "name": "i", 1045 "decorators": [], 1046 "loc": { 1047 "start": { 1048 "line": 35, 1049 "column": 5 1050 }, 1051 "end": { 1052 "line": 35, 1053 "column": 6 1054 } 1055 } 1056 }, 1057 "property": { 1058 "type": "Identifier", 1059 "name": "xyz2", 1060 "decorators": [], 1061 "loc": { 1062 "start": { 1063 "line": 35, 1064 "column": 7 1065 }, 1066 "end": { 1067 "line": 35, 1068 "column": 11 1069 } 1070 } 1071 }, 1072 "computed": false, 1073 "optional": false, 1074 "loc": { 1075 "start": { 1076 "line": 35, 1077 "column": 5 1078 }, 1079 "end": { 1080 "line": 35, 1081 "column": 11 1082 } 1083 } 1084 }, 1085 "arguments": [], 1086 "optional": false, 1087 "loc": { 1088 "start": { 1089 "line": 35, 1090 "column": 5 1091 }, 1092 "end": { 1093 "line": 35, 1094 "column": 13 1095 } 1096 } 1097 }, 1098 "loc": { 1099 "start": { 1100 "line": 35, 1101 "column": 5 1102 }, 1103 "end": { 1104 "line": 35, 1105 "column": 14 1106 } 1107 } 1108 } 1109 ], 1110 "loc": { 1111 "start": { 1112 "line": 32, 1113 "column": 23 1114 }, 1115 "end": { 1116 "line": 36, 1117 "column": 2 1118 } 1119 } 1120 }, 1121 "loc": { 1122 "start": { 1123 "line": 32, 1124 "column": 14 1125 }, 1126 "end": { 1127 "line": 36, 1128 "column": 2 1129 } 1130 } 1131 }, 1132 "loc": { 1133 "start": { 1134 "line": 32, 1135 "column": 14 1136 }, 1137 "end": { 1138 "line": 36, 1139 "column": 2 1140 } 1141 } 1142 }, 1143 "overloads": [], 1144 "decorators": [], 1145 "loc": { 1146 "start": { 1147 "line": 32, 1148 "column": 1 1149 }, 1150 "end": { 1151 "line": 36, 1152 "column": 2 1153 } 1154 } 1155 } 1156 ], 1157 "loc": { 1158 "start": { 1159 "line": 1, 1160 "column": 1 1161 }, 1162 "end": { 1163 "line": 1, 1164 "column": 1 1165 } 1166 } 1167 }, 1168 "loc": { 1169 "start": { 1170 "line": 1, 1171 "column": 1 1172 }, 1173 "end": { 1174 "line": 1, 1175 "column": 1 1176 } 1177 } 1178 } 1179 ], 1180 "loc": { 1181 "start": { 1182 "line": 1, 1183 "column": 1 1184 }, 1185 "end": { 1186 "line": 37, 1187 "column": 1 1188 } 1189 } 1190} 1191