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