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