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