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