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