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