1{ 2 "type": "Program", 3 "statements": [ 4 { 5 "type": "FunctionDeclaration", 6 "function": { 7 "type": "ScriptFunction", 8 "id": { 9 "type": "Identifier", 10 "name": "func1", 11 "decorators": [], 12 "loc": { 13 "start": { 14 "line": 17, 15 "column": 10, 16 "program": "test_generic.ts" 17 }, 18 "end": { 19 "line": 17, 20 "column": 15, 21 "program": "test_generic.ts" 22 } 23 } 24 }, 25 "generator": false, 26 "async": false, 27 "expression": false, 28 "params": [ 29 { 30 "type": "Identifier", 31 "name": "arg", 32 "typeAnnotation": { 33 "type": "TSTypeReference", 34 "typeName": { 35 "type": "Identifier", 36 "name": "Type", 37 "decorators": [], 38 "loc": { 39 "start": { 40 "line": 17, 41 "column": 59, 42 "program": "test_generic.ts" 43 }, 44 "end": { 45 "line": 17, 46 "column": 63, 47 "program": "test_generic.ts" 48 } 49 } 50 }, 51 "loc": { 52 "start": { 53 "line": 17, 54 "column": 59, 55 "program": "test_generic.ts" 56 }, 57 "end": { 58 "line": 17, 59 "column": 63, 60 "program": "test_generic.ts" 61 } 62 } 63 }, 64 "decorators": [], 65 "loc": { 66 "start": { 67 "line": 17, 68 "column": 54, 69 "program": "test_generic.ts" 70 }, 71 "end": { 72 "line": 17, 73 "column": 57, 74 "program": "test_generic.ts" 75 } 76 } 77 } 78 ], 79 "returnType": { 80 "type": "TSTypeReference", 81 "typeName": { 82 "type": "Identifier", 83 "name": "Type", 84 "decorators": [], 85 "loc": { 86 "start": { 87 "line": 17, 88 "column": 66, 89 "program": "test_generic.ts" 90 }, 91 "end": { 92 "line": 17, 93 "column": 70, 94 "program": "test_generic.ts" 95 } 96 } 97 }, 98 "loc": { 99 "start": { 100 "line": 17, 101 "column": 66, 102 "program": "test_generic.ts" 103 }, 104 "end": { 105 "line": 17, 106 "column": 70, 107 "program": "test_generic.ts" 108 } 109 } 110 }, 111 "typeParameters": { 112 "type": "TSTypeParameterDeclaration", 113 "params": [ 114 { 115 "type": "TSTypeParameter", 116 "name": { 117 "type": "Identifier", 118 "name": "Type", 119 "decorators": [], 120 "loc": { 121 "start": { 122 "line": 17, 123 "column": 16, 124 "program": "test_generic.ts" 125 }, 126 "end": { 127 "line": 17, 128 "column": 20, 129 "program": "test_generic.ts" 130 } 131 } 132 }, 133 "loc": { 134 "start": { 135 "line": 17, 136 "column": 16, 137 "program": "test_generic.ts" 138 }, 139 "end": { 140 "line": 17, 141 "column": 21, 142 "program": "test_generic.ts" 143 } 144 } 145 }, 146 { 147 "type": "TSTypeParameter", 148 "name": { 149 "type": "Identifier", 150 "name": "A", 151 "decorators": [], 152 "loc": { 153 "start": { 154 "line": 17, 155 "column": 22, 156 "program": "test_generic.ts" 157 }, 158 "end": { 159 "line": 17, 160 "column": 23, 161 "program": "test_generic.ts" 162 } 163 } 164 }, 165 "loc": { 166 "start": { 167 "line": 17, 168 "column": 22, 169 "program": "test_generic.ts" 170 }, 171 "end": { 172 "line": 17, 173 "column": 24, 174 "program": "test_generic.ts" 175 } 176 } 177 }, 178 { 179 "type": "TSTypeParameter", 180 "name": { 181 "type": "Identifier", 182 "name": "B", 183 "decorators": [], 184 "loc": { 185 "start": { 186 "line": 17, 187 "column": 25, 188 "program": "test_generic.ts" 189 }, 190 "end": { 191 "line": 17, 192 "column": 26, 193 "program": "test_generic.ts" 194 } 195 } 196 }, 197 "constraint": { 198 "type": "TSTypeOperator", 199 "operator": "readonly", 200 "typeAnnotation": { 201 "type": "TSArrayType", 202 "elementType": { 203 "type": "TSNumberKeyword", 204 "loc": { 205 "start": { 206 "line": 17, 207 "column": 44, 208 "program": "test_generic.ts" 209 }, 210 "end": { 211 "line": 17, 212 "column": 50, 213 "program": "test_generic.ts" 214 } 215 } 216 }, 217 "annotations": [], 218 "loc": { 219 "start": { 220 "line": 17, 221 "column": 44, 222 "program": "test_generic.ts" 223 }, 224 "end": { 225 "line": 17, 226 "column": 52, 227 "program": "test_generic.ts" 228 } 229 } 230 }, 231 "loc": { 232 "start": { 233 "line": 17, 234 "column": 35, 235 "program": "test_generic.ts" 236 }, 237 "end": { 238 "line": 17, 239 "column": 52, 240 "program": "test_generic.ts" 241 } 242 } 243 }, 244 "loc": { 245 "start": { 246 "line": 17, 247 "column": 25, 248 "program": "test_generic.ts" 249 }, 250 "end": { 251 "line": 17, 252 "column": 53, 253 "program": "test_generic.ts" 254 } 255 } 256 } 257 ], 258 "loc": { 259 "start": { 260 "line": 17, 261 "column": 15, 262 "program": "test_generic.ts" 263 }, 264 "end": { 265 "line": 17, 266 "column": 53, 267 "program": "test_generic.ts" 268 } 269 } 270 }, 271 "body": { 272 "type": "BlockStatement", 273 "statements": [ 274 { 275 "type": "ReturnStatement", 276 "argument": { 277 "type": "Identifier", 278 "name": "arg", 279 "decorators": [], 280 "loc": { 281 "start": { 282 "line": 18, 283 "column": 12, 284 "program": "test_generic.ts" 285 }, 286 "end": { 287 "line": 18, 288 "column": 15, 289 "program": "test_generic.ts" 290 } 291 } 292 }, 293 "loc": { 294 "start": { 295 "line": 18, 296 "column": 5, 297 "program": "test_generic.ts" 298 }, 299 "end": { 300 "line": 18, 301 "column": 16, 302 "program": "test_generic.ts" 303 } 304 } 305 } 306 ], 307 "loc": { 308 "start": { 309 "line": 17, 310 "column": 71, 311 "program": "test_generic.ts" 312 }, 313 "end": { 314 "line": 19, 315 "column": 2, 316 "program": "test_generic.ts" 317 } 318 } 319 }, 320 "loc": { 321 "start": { 322 "line": 17, 323 "column": 1, 324 "program": "test_generic.ts" 325 }, 326 "end": { 327 "line": 19, 328 "column": 2, 329 "program": "test_generic.ts" 330 } 331 } 332 }, 333 "loc": { 334 "start": { 335 "line": 17, 336 "column": 1, 337 "program": "test_generic.ts" 338 }, 339 "end": { 340 "line": 19, 341 "column": 2, 342 "program": "test_generic.ts" 343 } 344 } 345 }, 346 { 347 "type": "FunctionDeclaration", 348 "function": { 349 "type": "ScriptFunction", 350 "id": { 351 "type": "Identifier", 352 "name": "func2", 353 "decorators": [], 354 "loc": { 355 "start": { 356 "line": 21, 357 "column": 10, 358 "program": "test_generic.ts" 359 }, 360 "end": { 361 "line": 21, 362 "column": 15, 363 "program": "test_generic.ts" 364 } 365 } 366 }, 367 "generator": false, 368 "async": false, 369 "expression": false, 370 "params": [], 371 "typeParameters": { 372 "type": "TSTypeParameterDeclaration", 373 "params": [ 374 { 375 "type": "TSTypeParameter", 376 "name": { 377 "type": "Identifier", 378 "name": "A", 379 "decorators": [], 380 "loc": { 381 "start": { 382 "line": 21, 383 "column": 16, 384 "program": "test_generic.ts" 385 }, 386 "end": { 387 "line": 21, 388 "column": 17, 389 "program": "test_generic.ts" 390 } 391 } 392 }, 393 "constraint": { 394 "type": "TSTypeLiteral", 395 "members": [ 396 { 397 "type": "TSPropertySignature", 398 "computed": false, 399 "optional": false, 400 "readonly": false, 401 "key": { 402 "type": "Identifier", 403 "name": "a", 404 "decorators": [], 405 "loc": { 406 "start": { 407 "line": 21, 408 "column": 28, 409 "program": "test_generic.ts" 410 }, 411 "end": { 412 "line": 21, 413 "column": 29, 414 "program": "test_generic.ts" 415 } 416 } 417 }, 418 "typeAnnotation": { 419 "type": "TSNumberKeyword", 420 "loc": { 421 "start": { 422 "line": 21, 423 "column": 31, 424 "program": "test_generic.ts" 425 }, 426 "end": { 427 "line": 21, 428 "column": 37, 429 "program": "test_generic.ts" 430 } 431 } 432 }, 433 "loc": { 434 "start": { 435 "line": 21, 436 "column": 28, 437 "program": "test_generic.ts" 438 }, 439 "end": { 440 "line": 21, 441 "column": 38, 442 "program": "test_generic.ts" 443 } 444 } 445 }, 446 { 447 "type": "TSPropertySignature", 448 "computed": false, 449 "optional": false, 450 "readonly": false, 451 "key": { 452 "type": "Identifier", 453 "name": "b", 454 "decorators": [], 455 "loc": { 456 "start": { 457 "line": 21, 458 "column": 39, 459 "program": "test_generic.ts" 460 }, 461 "end": { 462 "line": 21, 463 "column": 40, 464 "program": "test_generic.ts" 465 } 466 } 467 }, 468 "typeAnnotation": { 469 "type": "TSStringKeyword", 470 "loc": { 471 "start": { 472 "line": 21, 473 "column": 42, 474 "program": "test_generic.ts" 475 }, 476 "end": { 477 "line": 21, 478 "column": 48, 479 "program": "test_generic.ts" 480 } 481 } 482 }, 483 "loc": { 484 "start": { 485 "line": 21, 486 "column": 39, 487 "program": "test_generic.ts" 488 }, 489 "end": { 490 "line": 21, 491 "column": 50, 492 "program": "test_generic.ts" 493 } 494 } 495 } 496 ], 497 "loc": { 498 "start": { 499 "line": 21, 500 "column": 26, 501 "program": "test_generic.ts" 502 }, 503 "end": { 504 "line": 21, 505 "column": 50, 506 "program": "test_generic.ts" 507 } 508 } 509 }, 510 "loc": { 511 "start": { 512 "line": 21, 513 "column": 16, 514 "program": "test_generic.ts" 515 }, 516 "end": { 517 "line": 21, 518 "column": 51, 519 "program": "test_generic.ts" 520 } 521 } 522 } 523 ], 524 "loc": { 525 "start": { 526 "line": 21, 527 "column": 15, 528 "program": "test_generic.ts" 529 }, 530 "end": { 531 "line": 21, 532 "column": 51, 533 "program": "test_generic.ts" 534 } 535 } 536 }, 537 "body": { 538 "type": "BlockStatement", 539 "statements": [], 540 "loc": { 541 "start": { 542 "line": 21, 543 "column": 54, 544 "program": "test_generic.ts" 545 }, 546 "end": { 547 "line": 21, 548 "column": 57, 549 "program": "test_generic.ts" 550 } 551 } 552 }, 553 "loc": { 554 "start": { 555 "line": 21, 556 "column": 1, 557 "program": "test_generic.ts" 558 }, 559 "end": { 560 "line": 21, 561 "column": 57, 562 "program": "test_generic.ts" 563 } 564 } 565 }, 566 "loc": { 567 "start": { 568 "line": 21, 569 "column": 1, 570 "program": "test_generic.ts" 571 }, 572 "end": { 573 "line": 21, 574 "column": 57, 575 "program": "test_generic.ts" 576 } 577 } 578 }, 579 { 580 "type": "FunctionDeclaration", 581 "function": { 582 "type": "ScriptFunction", 583 "id": { 584 "type": "Identifier", 585 "name": "func3", 586 "decorators": [], 587 "loc": { 588 "start": { 589 "line": 23, 590 "column": 10, 591 "program": "test_generic.ts" 592 }, 593 "end": { 594 "line": 23, 595 "column": 15, 596 "program": "test_generic.ts" 597 } 598 } 599 }, 600 "generator": false, 601 "async": false, 602 "expression": false, 603 "params": [ 604 { 605 "type": "Identifier", 606 "name": "a", 607 "typeAnnotation": { 608 "type": "TSTypeReference", 609 "typeName": { 610 "type": "Identifier", 611 "name": "A", 612 "decorators": [], 613 "loc": { 614 "start": { 615 "line": 23, 616 "column": 90, 617 "program": "test_generic.ts" 618 }, 619 "end": { 620 "line": 23, 621 "column": 91, 622 "program": "test_generic.ts" 623 } 624 } 625 }, 626 "loc": { 627 "start": { 628 "line": 23, 629 "column": 90, 630 "program": "test_generic.ts" 631 }, 632 "end": { 633 "line": 23, 634 "column": 91, 635 "program": "test_generic.ts" 636 } 637 } 638 }, 639 "decorators": [], 640 "loc": { 641 "start": { 642 "line": 23, 643 "column": 87, 644 "program": "test_generic.ts" 645 }, 646 "end": { 647 "line": 23, 648 "column": 88, 649 "program": "test_generic.ts" 650 } 651 } 652 }, 653 { 654 "type": "Identifier", 655 "name": "b", 656 "typeAnnotation": { 657 "type": "TSStringKeyword", 658 "loc": { 659 "start": { 660 "line": 23, 661 "column": 96, 662 "program": "test_generic.ts" 663 }, 664 "end": { 665 "line": 23, 666 "column": 102, 667 "program": "test_generic.ts" 668 } 669 } 670 }, 671 "decorators": [], 672 "loc": { 673 "start": { 674 "line": 23, 675 "column": 93, 676 "program": "test_generic.ts" 677 }, 678 "end": { 679 "line": 23, 680 "column": 94, 681 "program": "test_generic.ts" 682 } 683 } 684 } 685 ], 686 "returnType": { 687 "type": "TSUnionType", 688 "types": [ 689 { 690 "type": "TSNumberKeyword", 691 "loc": { 692 "start": { 693 "line": 23, 694 "column": 105, 695 "program": "test_generic.ts" 696 }, 697 "end": { 698 "line": 23, 699 "column": 111, 700 "program": "test_generic.ts" 701 } 702 } 703 }, 704 { 705 "type": "TSBooleanKeyword", 706 "loc": { 707 "start": { 708 "line": 23, 709 "column": 114, 710 "program": "test_generic.ts" 711 }, 712 "end": { 713 "line": 23, 714 "column": 121, 715 "program": "test_generic.ts" 716 } 717 } 718 } 719 ], 720 "loc": { 721 "start": { 722 "line": 23, 723 "column": 105, 724 "program": "test_generic.ts" 725 }, 726 "end": { 727 "line": 23, 728 "column": 121, 729 "program": "test_generic.ts" 730 } 731 } 732 }, 733 "typeParameters": { 734 "type": "TSTypeParameterDeclaration", 735 "params": [ 736 { 737 "type": "TSTypeParameter", 738 "name": { 739 "type": "Identifier", 740 "name": "A", 741 "decorators": [], 742 "loc": { 743 "start": { 744 "line": 23, 745 "column": 16, 746 "program": "test_generic.ts" 747 }, 748 "end": { 749 "line": 23, 750 "column": 17, 751 "program": "test_generic.ts" 752 } 753 } 754 }, 755 "constraint": { 756 "type": "TSTypeOperator", 757 "operator": "keyof", 758 "typeAnnotation": { 759 "type": "TSTypeLiteral", 760 "members": [ 761 { 762 "type": "TSPropertySignature", 763 "computed": false, 764 "optional": false, 765 "readonly": false, 766 "key": { 767 "type": "Identifier", 768 "name": "a", 769 "decorators": [], 770 "loc": { 771 "start": { 772 "line": 23, 773 "column": 34, 774 "program": "test_generic.ts" 775 }, 776 "end": { 777 "line": 23, 778 "column": 35, 779 "program": "test_generic.ts" 780 } 781 } 782 }, 783 "typeAnnotation": { 784 "type": "TSTypeLiteral", 785 "members": [ 786 { 787 "type": "TSPropertySignature", 788 "computed": false, 789 "optional": false, 790 "readonly": false, 791 "key": { 792 "type": "Identifier", 793 "name": "b", 794 "decorators": [], 795 "loc": { 796 "start": { 797 "line": 23, 798 "column": 39, 799 "program": "test_generic.ts" 800 }, 801 "end": { 802 "line": 23, 803 "column": 40, 804 "program": "test_generic.ts" 805 } 806 } 807 }, 808 "typeAnnotation": { 809 "type": "TSNumberKeyword", 810 "loc": { 811 "start": { 812 "line": 23, 813 "column": 42, 814 "program": "test_generic.ts" 815 }, 816 "end": { 817 "line": 23, 818 "column": 48, 819 "program": "test_generic.ts" 820 } 821 } 822 }, 823 "loc": { 824 "start": { 825 "line": 23, 826 "column": 39, 827 "program": "test_generic.ts" 828 }, 829 "end": { 830 "line": 23, 831 "column": 49, 832 "program": "test_generic.ts" 833 } 834 } 835 }, 836 { 837 "type": "TSPropertySignature", 838 "computed": false, 839 "optional": false, 840 "readonly": false, 841 "key": { 842 "type": "Identifier", 843 "name": "c", 844 "decorators": [], 845 "loc": { 846 "start": { 847 "line": 23, 848 "column": 50, 849 "program": "test_generic.ts" 850 }, 851 "end": { 852 "line": 23, 853 "column": 51, 854 "program": "test_generic.ts" 855 } 856 } 857 }, 858 "typeAnnotation": { 859 "type": "TSBooleanKeyword", 860 "loc": { 861 "start": { 862 "line": 23, 863 "column": 53, 864 "program": "test_generic.ts" 865 }, 866 "end": { 867 "line": 23, 868 "column": 60, 869 "program": "test_generic.ts" 870 } 871 } 872 }, 873 "loc": { 874 "start": { 875 "line": 23, 876 "column": 50, 877 "program": "test_generic.ts" 878 }, 879 "end": { 880 "line": 23, 881 "column": 62, 882 "program": "test_generic.ts" 883 } 884 } 885 } 886 ], 887 "loc": { 888 "start": { 889 "line": 23, 890 "column": 37, 891 "program": "test_generic.ts" 892 }, 893 "end": { 894 "line": 23, 895 "column": 62, 896 "program": "test_generic.ts" 897 } 898 } 899 }, 900 "loc": { 901 "start": { 902 "line": 23, 903 "column": 34, 904 "program": "test_generic.ts" 905 }, 906 "end": { 907 "line": 23, 908 "column": 63, 909 "program": "test_generic.ts" 910 } 911 } 912 }, 913 { 914 "type": "TSPropertySignature", 915 "computed": false, 916 "optional": false, 917 "readonly": false, 918 "key": { 919 "type": "Identifier", 920 "name": "b", 921 "decorators": [], 922 "loc": { 923 "start": { 924 "line": 23, 925 "column": 64, 926 "program": "test_generic.ts" 927 }, 928 "end": { 929 "line": 23, 930 "column": 65, 931 "program": "test_generic.ts" 932 } 933 } 934 }, 935 "typeAnnotation": { 936 "type": "TSTupleType", 937 "elementTypes": [ 938 { 939 "type": "TSNumberKeyword", 940 "loc": { 941 "start": { 942 "line": 23, 943 "column": 68, 944 "program": "test_generic.ts" 945 }, 946 "end": { 947 "line": 23, 948 "column": 75, 949 "program": "test_generic.ts" 950 } 951 } 952 }, 953 { 954 "type": "TSStringKeyword", 955 "loc": { 956 "start": { 957 "line": 23, 958 "column": 76, 959 "program": "test_generic.ts" 960 }, 961 "end": { 962 "line": 23, 963 "column": 83, 964 "program": "test_generic.ts" 965 } 966 } 967 } 968 ], 969 "loc": { 970 "start": { 971 "line": 23, 972 "column": 67, 973 "program": "test_generic.ts" 974 }, 975 "end": { 976 "line": 23, 977 "column": 83, 978 "program": "test_generic.ts" 979 } 980 } 981 }, 982 "loc": { 983 "start": { 984 "line": 23, 985 "column": 64, 986 "program": "test_generic.ts" 987 }, 988 "end": { 989 "line": 23, 990 "column": 85, 991 "program": "test_generic.ts" 992 } 993 } 994 } 995 ], 996 "loc": { 997 "start": { 998 "line": 23, 999 "column": 32, 1000 "program": "test_generic.ts" 1001 }, 1002 "end": { 1003 "line": 23, 1004 "column": 85, 1005 "program": "test_generic.ts" 1006 } 1007 } 1008 }, 1009 "loc": { 1010 "start": { 1011 "line": 23, 1012 "column": 26, 1013 "program": "test_generic.ts" 1014 }, 1015 "end": { 1016 "line": 23, 1017 "column": 85, 1018 "program": "test_generic.ts" 1019 } 1020 } 1021 }, 1022 "loc": { 1023 "start": { 1024 "line": 23, 1025 "column": 16, 1026 "program": "test_generic.ts" 1027 }, 1028 "end": { 1029 "line": 23, 1030 "column": 86, 1031 "program": "test_generic.ts" 1032 } 1033 } 1034 } 1035 ], 1036 "loc": { 1037 "start": { 1038 "line": 23, 1039 "column": 15, 1040 "program": "test_generic.ts" 1041 }, 1042 "end": { 1043 "line": 23, 1044 "column": 86, 1045 "program": "test_generic.ts" 1046 } 1047 } 1048 }, 1049 "body": { 1050 "type": "BlockStatement", 1051 "statements": [ 1052 { 1053 "type": "ReturnStatement", 1054 "argument": { 1055 "type": "BooleanLiteral", 1056 "value": true, 1057 "loc": { 1058 "start": { 1059 "line": 24, 1060 "column": 12, 1061 "program": "test_generic.ts" 1062 }, 1063 "end": { 1064 "line": 24, 1065 "column": 16, 1066 "program": "test_generic.ts" 1067 } 1068 } 1069 }, 1070 "loc": { 1071 "start": { 1072 "line": 24, 1073 "column": 5, 1074 "program": "test_generic.ts" 1075 }, 1076 "end": { 1077 "line": 24, 1078 "column": 17, 1079 "program": "test_generic.ts" 1080 } 1081 } 1082 } 1083 ], 1084 "loc": { 1085 "start": { 1086 "line": 23, 1087 "column": 122, 1088 "program": "test_generic.ts" 1089 }, 1090 "end": { 1091 "line": 25, 1092 "column": 2, 1093 "program": "test_generic.ts" 1094 } 1095 } 1096 }, 1097 "loc": { 1098 "start": { 1099 "line": 23, 1100 "column": 1, 1101 "program": "test_generic.ts" 1102 }, 1103 "end": { 1104 "line": 25, 1105 "column": 2, 1106 "program": "test_generic.ts" 1107 } 1108 } 1109 }, 1110 "loc": { 1111 "start": { 1112 "line": 23, 1113 "column": 1, 1114 "program": "test_generic.ts" 1115 }, 1116 "end": { 1117 "line": 25, 1118 "column": 2, 1119 "program": "test_generic.ts" 1120 } 1121 } 1122 }, 1123 { 1124 "type": "TSTypeAliasDeclaration", 1125 "id": { 1126 "type": "Identifier", 1127 "name": "PromiseConstructorLike", 1128 "decorators": [], 1129 "loc": { 1130 "start": { 1131 "line": 27, 1132 "column": 14, 1133 "program": "test_generic.ts" 1134 }, 1135 "end": { 1136 "line": 27, 1137 "column": 36, 1138 "program": "test_generic.ts" 1139 } 1140 } 1141 }, 1142 "typeAnnotation": { 1143 "type": "TSConstructorType", 1144 "params": [ 1145 { 1146 "type": "Identifier", 1147 "name": "executor", 1148 "typeAnnotation": { 1149 "type": "TSFunctionType", 1150 "params": [ 1151 { 1152 "type": "Identifier", 1153 "name": "resolve", 1154 "typeAnnotation": { 1155 "type": "TSFunctionType", 1156 "params": [ 1157 { 1158 "type": "Identifier", 1159 "name": "value", 1160 "typeAnnotation": { 1161 "type": "TSUnionType", 1162 "types": [ 1163 { 1164 "type": "TSTypeReference", 1165 "typeName": { 1166 "type": "Identifier", 1167 "name": "T", 1168 "decorators": [], 1169 "loc": { 1170 "start": { 1171 "line": 27, 1172 "column": 75, 1173 "program": "test_generic.ts" 1174 }, 1175 "end": { 1176 "line": 27, 1177 "column": 76, 1178 "program": "test_generic.ts" 1179 } 1180 } 1181 }, 1182 "loc": { 1183 "start": { 1184 "line": 27, 1185 "column": 75, 1186 "program": "test_generic.ts" 1187 }, 1188 "end": { 1189 "line": 27, 1190 "column": 76, 1191 "program": "test_generic.ts" 1192 } 1193 } 1194 }, 1195 { 1196 "type": "TSTypeReference", 1197 "typeName": { 1198 "type": "Identifier", 1199 "name": "PromiseLike", 1200 "decorators": [], 1201 "loc": { 1202 "start": { 1203 "line": 27, 1204 "column": 79, 1205 "program": "test_generic.ts" 1206 }, 1207 "end": { 1208 "line": 27, 1209 "column": 90, 1210 "program": "test_generic.ts" 1211 } 1212 } 1213 }, 1214 "typeParameters": { 1215 "type": "TSTypeParameterInstantiation", 1216 "params": [ 1217 { 1218 "type": "TSTypeReference", 1219 "typeName": { 1220 "type": "Identifier", 1221 "name": "T", 1222 "decorators": [], 1223 "loc": { 1224 "start": { 1225 "line": 27, 1226 "column": 91, 1227 "program": "test_generic.ts" 1228 }, 1229 "end": { 1230 "line": 27, 1231 "column": 92, 1232 "program": "test_generic.ts" 1233 } 1234 } 1235 }, 1236 "loc": { 1237 "start": { 1238 "line": 27, 1239 "column": 91, 1240 "program": "test_generic.ts" 1241 }, 1242 "end": { 1243 "line": 27, 1244 "column": 92, 1245 "program": "test_generic.ts" 1246 } 1247 } 1248 } 1249 ], 1250 "loc": { 1251 "start": { 1252 "line": 27, 1253 "column": 79, 1254 "program": "test_generic.ts" 1255 }, 1256 "end": { 1257 "line": 27, 1258 "column": 93, 1259 "program": "test_generic.ts" 1260 } 1261 } 1262 }, 1263 "loc": { 1264 "start": { 1265 "line": 27, 1266 "column": 79, 1267 "program": "test_generic.ts" 1268 }, 1269 "end": { 1270 "line": 27, 1271 "column": 90, 1272 "program": "test_generic.ts" 1273 } 1274 } 1275 } 1276 ], 1277 "loc": { 1278 "start": { 1279 "line": 27, 1280 "column": 75, 1281 "program": "test_generic.ts" 1282 }, 1283 "end": { 1284 "line": 27, 1285 "column": 90, 1286 "program": "test_generic.ts" 1287 } 1288 } 1289 }, 1290 "decorators": [], 1291 "loc": { 1292 "start": { 1293 "line": 27, 1294 "column": 68, 1295 "program": "test_generic.ts" 1296 }, 1297 "end": { 1298 "line": 27, 1299 "column": 73, 1300 "program": "test_generic.ts" 1301 } 1302 } 1303 } 1304 ], 1305 "returnType": { 1306 "type": "TSVoidKeyword", 1307 "loc": { 1308 "start": { 1309 "line": 27, 1310 "column": 98, 1311 "program": "test_generic.ts" 1312 }, 1313 "end": { 1314 "line": 27, 1315 "column": 102, 1316 "program": "test_generic.ts" 1317 } 1318 } 1319 }, 1320 "loc": { 1321 "start": { 1322 "line": 27, 1323 "column": 67, 1324 "program": "test_generic.ts" 1325 }, 1326 "end": { 1327 "line": 27, 1328 "column": 102, 1329 "program": "test_generic.ts" 1330 } 1331 } 1332 }, 1333 "decorators": [], 1334 "loc": { 1335 "start": { 1336 "line": 27, 1337 "column": 58, 1338 "program": "test_generic.ts" 1339 }, 1340 "end": { 1341 "line": 27, 1342 "column": 65, 1343 "program": "test_generic.ts" 1344 } 1345 } 1346 }, 1347 { 1348 "type": "Identifier", 1349 "name": "reject", 1350 "typeAnnotation": { 1351 "type": "TSFunctionType", 1352 "params": [ 1353 { 1354 "type": "Identifier", 1355 "name": "reason", 1356 "typeAnnotation": { 1357 "type": "TSAnyKeyword", 1358 "loc": { 1359 "start": { 1360 "line": 27, 1361 "column": 122, 1362 "program": "test_generic.ts" 1363 }, 1364 "end": { 1365 "line": 27, 1366 "column": 125, 1367 "program": "test_generic.ts" 1368 } 1369 } 1370 }, 1371 "optional": true, 1372 "decorators": [], 1373 "loc": { 1374 "start": { 1375 "line": 27, 1376 "column": 113, 1377 "program": "test_generic.ts" 1378 }, 1379 "end": { 1380 "line": 27, 1381 "column": 119, 1382 "program": "test_generic.ts" 1383 } 1384 } 1385 } 1386 ], 1387 "returnType": { 1388 "type": "TSVoidKeyword", 1389 "loc": { 1390 "start": { 1391 "line": 27, 1392 "column": 130, 1393 "program": "test_generic.ts" 1394 }, 1395 "end": { 1396 "line": 27, 1397 "column": 134, 1398 "program": "test_generic.ts" 1399 } 1400 } 1401 }, 1402 "loc": { 1403 "start": { 1404 "line": 27, 1405 "column": 112, 1406 "program": "test_generic.ts" 1407 }, 1408 "end": { 1409 "line": 27, 1410 "column": 134, 1411 "program": "test_generic.ts" 1412 } 1413 } 1414 }, 1415 "decorators": [], 1416 "loc": { 1417 "start": { 1418 "line": 27, 1419 "column": 104, 1420 "program": "test_generic.ts" 1421 }, 1422 "end": { 1423 "line": 27, 1424 "column": 110, 1425 "program": "test_generic.ts" 1426 } 1427 } 1428 } 1429 ], 1430 "returnType": { 1431 "type": "TSVoidKeyword", 1432 "loc": { 1433 "start": { 1434 "line": 27, 1435 "column": 139, 1436 "program": "test_generic.ts" 1437 }, 1438 "end": { 1439 "line": 27, 1440 "column": 143, 1441 "program": "test_generic.ts" 1442 } 1443 } 1444 }, 1445 "loc": { 1446 "start": { 1447 "line": 27, 1448 "column": 57, 1449 "program": "test_generic.ts" 1450 }, 1451 "end": { 1452 "line": 27, 1453 "column": 143, 1454 "program": "test_generic.ts" 1455 } 1456 } 1457 }, 1458 "decorators": [], 1459 "loc": { 1460 "start": { 1461 "line": 27, 1462 "column": 47, 1463 "program": "test_generic.ts" 1464 }, 1465 "end": { 1466 "line": 27, 1467 "column": 55, 1468 "program": "test_generic.ts" 1469 } 1470 } 1471 } 1472 ], 1473 "typeParameters": { 1474 "type": "TSTypeParameterDeclaration", 1475 "params": [ 1476 { 1477 "type": "TSTypeParameter", 1478 "name": { 1479 "type": "Identifier", 1480 "name": "T", 1481 "decorators": [], 1482 "loc": { 1483 "start": { 1484 "line": 27, 1485 "column": 44, 1486 "program": "test_generic.ts" 1487 }, 1488 "end": { 1489 "line": 27, 1490 "column": 45, 1491 "program": "test_generic.ts" 1492 } 1493 } 1494 }, 1495 "loc": { 1496 "start": { 1497 "line": 27, 1498 "column": 44, 1499 "program": "test_generic.ts" 1500 }, 1501 "end": { 1502 "line": 27, 1503 "column": 46, 1504 "program": "test_generic.ts" 1505 } 1506 } 1507 } 1508 ], 1509 "loc": { 1510 "start": { 1511 "line": 27, 1512 "column": 43, 1513 "program": "test_generic.ts" 1514 }, 1515 "end": { 1516 "line": 27, 1517 "column": 46, 1518 "program": "test_generic.ts" 1519 } 1520 } 1521 }, 1522 "returnType": { 1523 "type": "TSTypeReference", 1524 "typeName": { 1525 "type": "Identifier", 1526 "name": "PromiseLike", 1527 "decorators": [], 1528 "loc": { 1529 "start": { 1530 "line": 27, 1531 "column": 148, 1532 "program": "test_generic.ts" 1533 }, 1534 "end": { 1535 "line": 27, 1536 "column": 159, 1537 "program": "test_generic.ts" 1538 } 1539 } 1540 }, 1541 "typeParameters": { 1542 "type": "TSTypeParameterInstantiation", 1543 "params": [ 1544 { 1545 "type": "TSTypeReference", 1546 "typeName": { 1547 "type": "Identifier", 1548 "name": "T", 1549 "decorators": [], 1550 "loc": { 1551 "start": { 1552 "line": 27, 1553 "column": 160, 1554 "program": "test_generic.ts" 1555 }, 1556 "end": { 1557 "line": 27, 1558 "column": 161, 1559 "program": "test_generic.ts" 1560 } 1561 } 1562 }, 1563 "loc": { 1564 "start": { 1565 "line": 27, 1566 "column": 160, 1567 "program": "test_generic.ts" 1568 }, 1569 "end": { 1570 "line": 27, 1571 "column": 161, 1572 "program": "test_generic.ts" 1573 } 1574 } 1575 } 1576 ], 1577 "loc": { 1578 "start": { 1579 "line": 27, 1580 "column": 148, 1581 "program": "test_generic.ts" 1582 }, 1583 "end": { 1584 "line": 27, 1585 "column": 162, 1586 "program": "test_generic.ts" 1587 } 1588 } 1589 }, 1590 "loc": { 1591 "start": { 1592 "line": 27, 1593 "column": 148, 1594 "program": "test_generic.ts" 1595 }, 1596 "end": { 1597 "line": 27, 1598 "column": 159, 1599 "program": "test_generic.ts" 1600 } 1601 } 1602 }, 1603 "loc": { 1604 "start": { 1605 "line": 27, 1606 "column": 39, 1607 "program": "test_generic.ts" 1608 }, 1609 "end": { 1610 "line": 27, 1611 "column": 159, 1612 "program": "test_generic.ts" 1613 } 1614 } 1615 }, 1616 "loc": { 1617 "start": { 1618 "line": 27, 1619 "column": 9, 1620 "program": "test_generic.ts" 1621 }, 1622 "end": { 1623 "line": 27, 1624 "column": 163, 1625 "program": "test_generic.ts" 1626 } 1627 } 1628 }, 1629 { 1630 "type": "EmptyStatement", 1631 "loc": { 1632 "start": { 1633 "line": 27, 1634 "column": 162, 1635 "program": "test_generic.ts" 1636 }, 1637 "end": { 1638 "line": 27, 1639 "column": 163, 1640 "program": "test_generic.ts" 1641 } 1642 } 1643 }, 1644 { 1645 "type": "TSInterfaceDeclaration", 1646 "body": { 1647 "type": "TSInterfaceBody", 1648 "body": [ 1649 { 1650 "type": "TSPropertySignature", 1651 "computed": false, 1652 "optional": false, 1653 "readonly": false, 1654 "key": { 1655 "type": "Identifier", 1656 "name": "a", 1657 "decorators": [], 1658 "loc": { 1659 "start": { 1660 "line": 30, 1661 "column": 5, 1662 "program": "test_generic.ts" 1663 }, 1664 "end": { 1665 "line": 30, 1666 "column": 6, 1667 "program": "test_generic.ts" 1668 } 1669 } 1670 }, 1671 "typeAnnotation": { 1672 "type": "TSNumberKeyword", 1673 "loc": { 1674 "start": { 1675 "line": 30, 1676 "column": 8, 1677 "program": "test_generic.ts" 1678 }, 1679 "end": { 1680 "line": 30, 1681 "column": 14, 1682 "program": "test_generic.ts" 1683 } 1684 } 1685 }, 1686 "loc": { 1687 "start": { 1688 "line": 30, 1689 "column": 5, 1690 "program": "test_generic.ts" 1691 }, 1692 "end": { 1693 "line": 30, 1694 "column": 15, 1695 "program": "test_generic.ts" 1696 } 1697 } 1698 }, 1699 { 1700 "type": "TSIndexSignature", 1701 "parameters": { 1702 "type": "Identifier", 1703 "name": "x", 1704 "typeAnnotation": { 1705 "type": "TSStringKeyword", 1706 "loc": { 1707 "start": { 1708 "line": 31, 1709 "column": 9, 1710 "program": "test_generic.ts" 1711 }, 1712 "end": { 1713 "line": 31, 1714 "column": 15, 1715 "program": "test_generic.ts" 1716 } 1717 } 1718 }, 1719 "decorators": [], 1720 "loc": { 1721 "start": { 1722 "line": 31, 1723 "column": 6, 1724 "program": "test_generic.ts" 1725 }, 1726 "end": { 1727 "line": 31, 1728 "column": 7, 1729 "program": "test_generic.ts" 1730 } 1731 } 1732 }, 1733 "typeAnnotation": { 1734 "type": "TSUnionType", 1735 "types": [ 1736 { 1737 "type": "TSBooleanKeyword", 1738 "loc": { 1739 "start": { 1740 "line": 31, 1741 "column": 18, 1742 "program": "test_generic.ts" 1743 }, 1744 "end": { 1745 "line": 31, 1746 "column": 25, 1747 "program": "test_generic.ts" 1748 } 1749 } 1750 }, 1751 { 1752 "type": "TSNumberKeyword", 1753 "loc": { 1754 "start": { 1755 "line": 31, 1756 "column": 28, 1757 "program": "test_generic.ts" 1758 }, 1759 "end": { 1760 "line": 31, 1761 "column": 34, 1762 "program": "test_generic.ts" 1763 } 1764 } 1765 } 1766 ], 1767 "loc": { 1768 "start": { 1769 "line": 31, 1770 "column": 18, 1771 "program": "test_generic.ts" 1772 }, 1773 "end": { 1774 "line": 31, 1775 "column": 34, 1776 "program": "test_generic.ts" 1777 } 1778 } 1779 }, 1780 "readonly": false, 1781 "loc": { 1782 "start": { 1783 "line": 31, 1784 "column": 5, 1785 "program": "test_generic.ts" 1786 }, 1787 "end": { 1788 "line": 31, 1789 "column": 35, 1790 "program": "test_generic.ts" 1791 } 1792 } 1793 } 1794 ], 1795 "loc": { 1796 "start": { 1797 "line": 29, 1798 "column": 53, 1799 "program": "test_generic.ts" 1800 }, 1801 "end": { 1802 "line": 32, 1803 "column": 2, 1804 "program": "test_generic.ts" 1805 } 1806 } 1807 }, 1808 "id": { 1809 "type": "Identifier", 1810 "name": "R", 1811 "decorators": [], 1812 "loc": { 1813 "start": { 1814 "line": 29, 1815 "column": 11, 1816 "program": "test_generic.ts" 1817 }, 1818 "end": { 1819 "line": 29, 1820 "column": 12, 1821 "program": "test_generic.ts" 1822 } 1823 } 1824 }, 1825 "extends": [], 1826 "typeParameters": { 1827 "type": "TSTypeParameterDeclaration", 1828 "params": [ 1829 { 1830 "type": "TSTypeParameter", 1831 "name": { 1832 "type": "Identifier", 1833 "name": "K", 1834 "decorators": [], 1835 "loc": { 1836 "start": { 1837 "line": 29, 1838 "column": 13, 1839 "program": "test_generic.ts" 1840 }, 1841 "end": { 1842 "line": 29, 1843 "column": 14, 1844 "program": "test_generic.ts" 1845 } 1846 } 1847 }, 1848 "constraint": { 1849 "type": "TSTupleType", 1850 "elementTypes": [ 1851 { 1852 "type": "TSNumberKeyword", 1853 "loc": { 1854 "start": { 1855 "line": 29, 1856 "column": 24, 1857 "program": "test_generic.ts" 1858 }, 1859 "end": { 1860 "line": 29, 1861 "column": 31, 1862 "program": "test_generic.ts" 1863 } 1864 } 1865 }, 1866 { 1867 "type": "TSStringKeyword", 1868 "loc": { 1869 "start": { 1870 "line": 29, 1871 "column": 32, 1872 "program": "test_generic.ts" 1873 }, 1874 "end": { 1875 "line": 29, 1876 "column": 39, 1877 "program": "test_generic.ts" 1878 } 1879 } 1880 } 1881 ], 1882 "loc": { 1883 "start": { 1884 "line": 29, 1885 "column": 23, 1886 "program": "test_generic.ts" 1887 }, 1888 "end": { 1889 "line": 29, 1890 "column": 39, 1891 "program": "test_generic.ts" 1892 } 1893 } 1894 }, 1895 "loc": { 1896 "start": { 1897 "line": 29, 1898 "column": 13, 1899 "program": "test_generic.ts" 1900 }, 1901 "end": { 1902 "line": 29, 1903 "column": 40, 1904 "program": "test_generic.ts" 1905 } 1906 } 1907 }, 1908 { 1909 "type": "TSTypeParameter", 1910 "name": { 1911 "type": "Identifier", 1912 "name": "T", 1913 "decorators": [], 1914 "loc": { 1915 "start": { 1916 "line": 29, 1917 "column": 41, 1918 "program": "test_generic.ts" 1919 }, 1920 "end": { 1921 "line": 29, 1922 "column": 42, 1923 "program": "test_generic.ts" 1924 } 1925 } 1926 }, 1927 "default": { 1928 "type": "TSStringKeyword", 1929 "loc": { 1930 "start": { 1931 "line": 29, 1932 "column": 45, 1933 "program": "test_generic.ts" 1934 }, 1935 "end": { 1936 "line": 29, 1937 "column": 51, 1938 "program": "test_generic.ts" 1939 } 1940 } 1941 }, 1942 "loc": { 1943 "start": { 1944 "line": 29, 1945 "column": 41, 1946 "program": "test_generic.ts" 1947 }, 1948 "end": { 1949 "line": 29, 1950 "column": 52, 1951 "program": "test_generic.ts" 1952 } 1953 } 1954 } 1955 ], 1956 "loc": { 1957 "start": { 1958 "line": 29, 1959 "column": 12, 1960 "program": "test_generic.ts" 1961 }, 1962 "end": { 1963 "line": 29, 1964 "column": 52, 1965 "program": "test_generic.ts" 1966 } 1967 } 1968 }, 1969 "loc": { 1970 "start": { 1971 "line": 29, 1972 "column": 1, 1973 "program": "test_generic.ts" 1974 }, 1975 "end": { 1976 "line": 32, 1977 "column": 2, 1978 "program": "test_generic.ts" 1979 } 1980 } 1981 }, 1982 { 1983 "type": "TSInterfaceDeclaration", 1984 "body": { 1985 "type": "TSInterfaceBody", 1986 "body": [ 1987 { 1988 "type": "TSCallSignatureDeclaration", 1989 "params": [], 1990 "typeParameters": { 1991 "type": "TSTypeParameterDeclaration", 1992 "params": [ 1993 { 1994 "type": "TSTypeParameter", 1995 "name": { 1996 "type": "Identifier", 1997 "name": "A", 1998 "decorators": [], 1999 "loc": { 2000 "start": { 2001 "line": 35, 2002 "column": 6, 2003 "program": "test_generic.ts" 2004 }, 2005 "end": { 2006 "line": 35, 2007 "column": 7, 2008 "program": "test_generic.ts" 2009 } 2010 } 2011 }, 2012 "loc": { 2013 "start": { 2014 "line": 35, 2015 "column": 6, 2016 "program": "test_generic.ts" 2017 }, 2018 "end": { 2019 "line": 35, 2020 "column": 8, 2021 "program": "test_generic.ts" 2022 } 2023 } 2024 } 2025 ], 2026 "loc": { 2027 "start": { 2028 "line": 35, 2029 "column": 5, 2030 "program": "test_generic.ts" 2031 }, 2032 "end": { 2033 "line": 35, 2034 "column": 8, 2035 "program": "test_generic.ts" 2036 } 2037 } 2038 }, 2039 "returnType": { 2040 "type": "TSNumberKeyword", 2041 "loc": { 2042 "start": { 2043 "line": 35, 2044 "column": 12, 2045 "program": "test_generic.ts" 2046 }, 2047 "end": { 2048 "line": 35, 2049 "column": 18, 2050 "program": "test_generic.ts" 2051 } 2052 } 2053 }, 2054 "loc": { 2055 "start": { 2056 "line": 35, 2057 "column": 5, 2058 "program": "test_generic.ts" 2059 }, 2060 "end": { 2061 "line": 35, 2062 "column": 19, 2063 "program": "test_generic.ts" 2064 } 2065 } 2066 }, 2067 { 2068 "type": "TSMethodSignature", 2069 "computed": false, 2070 "optional": false, 2071 "key": { 2072 "type": "Identifier", 2073 "name": "o", 2074 "decorators": [], 2075 "loc": { 2076 "start": { 2077 "line": 36, 2078 "column": 5, 2079 "program": "test_generic.ts" 2080 }, 2081 "end": { 2082 "line": 36, 2083 "column": 6, 2084 "program": "test_generic.ts" 2085 } 2086 } 2087 }, 2088 "params": [], 2089 "typeParameters": { 2090 "type": "TSTypeParameterDeclaration", 2091 "params": [ 2092 { 2093 "type": "TSTypeParameter", 2094 "name": { 2095 "type": "Identifier", 2096 "name": "A", 2097 "decorators": [], 2098 "loc": { 2099 "start": { 2100 "line": 36, 2101 "column": 7, 2102 "program": "test_generic.ts" 2103 }, 2104 "end": { 2105 "line": 36, 2106 "column": 8, 2107 "program": "test_generic.ts" 2108 } 2109 } 2110 }, 2111 "constraint": { 2112 "type": "TSNumberKeyword", 2113 "loc": { 2114 "start": { 2115 "line": 36, 2116 "column": 17, 2117 "program": "test_generic.ts" 2118 }, 2119 "end": { 2120 "line": 36, 2121 "column": 23, 2122 "program": "test_generic.ts" 2123 } 2124 } 2125 }, 2126 "loc": { 2127 "start": { 2128 "line": 36, 2129 "column": 7, 2130 "program": "test_generic.ts" 2131 }, 2132 "end": { 2133 "line": 36, 2134 "column": 24, 2135 "program": "test_generic.ts" 2136 } 2137 } 2138 } 2139 ], 2140 "loc": { 2141 "start": { 2142 "line": 36, 2143 "column": 6, 2144 "program": "test_generic.ts" 2145 }, 2146 "end": { 2147 "line": 36, 2148 "column": 24, 2149 "program": "test_generic.ts" 2150 } 2151 } 2152 }, 2153 "typeAnnotation": { 2154 "type": "TSTupleType", 2155 "elementTypes": [ 2156 { 2157 "type": "TSBooleanKeyword", 2158 "loc": { 2159 "start": { 2160 "line": 36, 2161 "column": 29, 2162 "program": "test_generic.ts" 2163 }, 2164 "end": { 2165 "line": 36, 2166 "column": 37, 2167 "program": "test_generic.ts" 2168 } 2169 } 2170 }, 2171 { 2172 "type": "TSArrayType", 2173 "elementType": { 2174 "type": "TSNumberKeyword", 2175 "loc": { 2176 "start": { 2177 "line": 36, 2178 "column": 38, 2179 "program": "test_generic.ts" 2180 }, 2181 "end": { 2182 "line": 36, 2183 "column": 44, 2184 "program": "test_generic.ts" 2185 } 2186 } 2187 }, 2188 "annotations": [], 2189 "loc": { 2190 "start": { 2191 "line": 36, 2192 "column": 38, 2193 "program": "test_generic.ts" 2194 }, 2195 "end": { 2196 "line": 36, 2197 "column": 47, 2198 "program": "test_generic.ts" 2199 } 2200 } 2201 } 2202 ], 2203 "loc": { 2204 "start": { 2205 "line": 36, 2206 "column": 28, 2207 "program": "test_generic.ts" 2208 }, 2209 "end": { 2210 "line": 36, 2211 "column": 47, 2212 "program": "test_generic.ts" 2213 } 2214 } 2215 }, 2216 "loc": { 2217 "start": { 2218 "line": 36, 2219 "column": 5, 2220 "program": "test_generic.ts" 2221 }, 2222 "end": { 2223 "line": 36, 2224 "column": 48, 2225 "program": "test_generic.ts" 2226 } 2227 } 2228 } 2229 ], 2230 "loc": { 2231 "start": { 2232 "line": 34, 2233 "column": 117, 2234 "program": "test_generic.ts" 2235 }, 2236 "end": { 2237 "line": 37, 2238 "column": 2, 2239 "program": "test_generic.ts" 2240 } 2241 } 2242 }, 2243 "id": { 2244 "type": "Identifier", 2245 "name": "U", 2246 "decorators": [], 2247 "loc": { 2248 "start": { 2249 "line": 34, 2250 "column": 11, 2251 "program": "test_generic.ts" 2252 }, 2253 "end": { 2254 "line": 34, 2255 "column": 12, 2256 "program": "test_generic.ts" 2257 } 2258 } 2259 }, 2260 "extends": [ 2261 { 2262 "type": "TSInterfaceHeritage", 2263 "expression": { 2264 "type": "TSTypeReference", 2265 "typeName": { 2266 "type": "Identifier", 2267 "name": "R", 2268 "decorators": [], 2269 "loc": { 2270 "start": { 2271 "line": 34, 2272 "column": 97, 2273 "program": "test_generic.ts" 2274 }, 2275 "end": { 2276 "line": 34, 2277 "column": 98, 2278 "program": "test_generic.ts" 2279 } 2280 } 2281 }, 2282 "typeParameters": { 2283 "type": "TSTypeParameterInstantiation", 2284 "params": [ 2285 { 2286 "type": "TSTupleType", 2287 "elementTypes": [ 2288 { 2289 "type": "TSNumberKeyword", 2290 "loc": { 2291 "start": { 2292 "line": 34, 2293 "column": 100, 2294 "program": "test_generic.ts" 2295 }, 2296 "end": { 2297 "line": 34, 2298 "column": 107, 2299 "program": "test_generic.ts" 2300 } 2301 } 2302 }, 2303 { 2304 "type": "TSStringKeyword", 2305 "loc": { 2306 "start": { 2307 "line": 34, 2308 "column": 108, 2309 "program": "test_generic.ts" 2310 }, 2311 "end": { 2312 "line": 34, 2313 "column": 115, 2314 "program": "test_generic.ts" 2315 } 2316 } 2317 } 2318 ], 2319 "loc": { 2320 "start": { 2321 "line": 34, 2322 "column": 99, 2323 "program": "test_generic.ts" 2324 }, 2325 "end": { 2326 "line": 34, 2327 "column": 115, 2328 "program": "test_generic.ts" 2329 } 2330 } 2331 } 2332 ], 2333 "loc": { 2334 "start": { 2335 "line": 34, 2336 "column": 98, 2337 "program": "test_generic.ts" 2338 }, 2339 "end": { 2340 "line": 34, 2341 "column": 116, 2342 "program": "test_generic.ts" 2343 } 2344 } 2345 }, 2346 "loc": { 2347 "start": { 2348 "line": 34, 2349 "column": 117, 2350 "program": "test_generic.ts" 2351 }, 2352 "end": { 2353 "line": 34, 2354 "column": 116, 2355 "program": "test_generic.ts" 2356 } 2357 } 2358 }, 2359 "loc": { 2360 "start": { 2361 "line": 34, 2362 "column": 117, 2363 "program": "test_generic.ts" 2364 }, 2365 "end": { 2366 "line": 34, 2367 "column": 116, 2368 "program": "test_generic.ts" 2369 } 2370 } 2371 } 2372 ], 2373 "typeParameters": { 2374 "type": "TSTypeParameterDeclaration", 2375 "params": [ 2376 { 2377 "type": "TSTypeParameter", 2378 "name": { 2379 "type": "Identifier", 2380 "name": "A", 2381 "decorators": [], 2382 "loc": { 2383 "start": { 2384 "line": 34, 2385 "column": 13, 2386 "program": "test_generic.ts" 2387 }, 2388 "end": { 2389 "line": 34, 2390 "column": 14, 2391 "program": "test_generic.ts" 2392 } 2393 } 2394 }, 2395 "constraint": { 2396 "type": "TSTypeOperator", 2397 "operator": "readonly", 2398 "typeAnnotation": { 2399 "type": "TSTupleType", 2400 "elementTypes": [ 2401 { 2402 "type": "TSNumberKeyword", 2403 "loc": { 2404 "start": { 2405 "line": 34, 2406 "column": 33, 2407 "program": "test_generic.ts" 2408 }, 2409 "end": { 2410 "line": 34, 2411 "column": 40, 2412 "program": "test_generic.ts" 2413 } 2414 } 2415 }, 2416 { 2417 "type": "TSNumberKeyword", 2418 "loc": { 2419 "start": { 2420 "line": 34, 2421 "column": 41, 2422 "program": "test_generic.ts" 2423 }, 2424 "end": { 2425 "line": 34, 2426 "column": 48, 2427 "program": "test_generic.ts" 2428 } 2429 } 2430 }, 2431 { 2432 "type": "TSTypeLiteral", 2433 "members": [ 2434 { 2435 "type": "TSPropertySignature", 2436 "computed": false, 2437 "optional": false, 2438 "readonly": false, 2439 "key": { 2440 "type": "Identifier", 2441 "name": "a", 2442 "decorators": [], 2443 "loc": { 2444 "start": { 2445 "line": 34, 2446 "column": 51, 2447 "program": "test_generic.ts" 2448 }, 2449 "end": { 2450 "line": 34, 2451 "column": 52, 2452 "program": "test_generic.ts" 2453 } 2454 } 2455 }, 2456 "typeAnnotation": { 2457 "type": "TSNumberKeyword", 2458 "loc": { 2459 "start": { 2460 "line": 34, 2461 "column": 54, 2462 "program": "test_generic.ts" 2463 }, 2464 "end": { 2465 "line": 34, 2466 "column": 60, 2467 "program": "test_generic.ts" 2468 } 2469 } 2470 }, 2471 "loc": { 2472 "start": { 2473 "line": 34, 2474 "column": 51, 2475 "program": "test_generic.ts" 2476 }, 2477 "end": { 2478 "line": 34, 2479 "column": 61, 2480 "program": "test_generic.ts" 2481 } 2482 } 2483 }, 2484 { 2485 "type": "TSPropertySignature", 2486 "computed": false, 2487 "optional": false, 2488 "readonly": false, 2489 "key": { 2490 "type": "Identifier", 2491 "name": "b", 2492 "decorators": [], 2493 "loc": { 2494 "start": { 2495 "line": 34, 2496 "column": 62, 2497 "program": "test_generic.ts" 2498 }, 2499 "end": { 2500 "line": 34, 2501 "column": 63, 2502 "program": "test_generic.ts" 2503 } 2504 } 2505 }, 2506 "typeAnnotation": { 2507 "type": "TSStringKeyword", 2508 "loc": { 2509 "start": { 2510 "line": 34, 2511 "column": 65, 2512 "program": "test_generic.ts" 2513 }, 2514 "end": { 2515 "line": 34, 2516 "column": 71, 2517 "program": "test_generic.ts" 2518 } 2519 } 2520 }, 2521 "loc": { 2522 "start": { 2523 "line": 34, 2524 "column": 62, 2525 "program": "test_generic.ts" 2526 }, 2527 "end": { 2528 "line": 34, 2529 "column": 73, 2530 "program": "test_generic.ts" 2531 } 2532 } 2533 } 2534 ], 2535 "loc": { 2536 "start": { 2537 "line": 34, 2538 "column": 49, 2539 "program": "test_generic.ts" 2540 }, 2541 "end": { 2542 "line": 34, 2543 "column": 74, 2544 "program": "test_generic.ts" 2545 } 2546 } 2547 } 2548 ], 2549 "loc": { 2550 "start": { 2551 "line": 34, 2552 "column": 32, 2553 "program": "test_generic.ts" 2554 }, 2555 "end": { 2556 "line": 34, 2557 "column": 74, 2558 "program": "test_generic.ts" 2559 } 2560 } 2561 }, 2562 "loc": { 2563 "start": { 2564 "line": 34, 2565 "column": 23, 2566 "program": "test_generic.ts" 2567 }, 2568 "end": { 2569 "line": 34, 2570 "column": 74, 2571 "program": "test_generic.ts" 2572 } 2573 } 2574 }, 2575 "loc": { 2576 "start": { 2577 "line": 34, 2578 "column": 13, 2579 "program": "test_generic.ts" 2580 }, 2581 "end": { 2582 "line": 34, 2583 "column": 75, 2584 "program": "test_generic.ts" 2585 } 2586 } 2587 }, 2588 { 2589 "type": "TSTypeParameter", 2590 "name": { 2591 "type": "Identifier", 2592 "name": "Z", 2593 "decorators": [], 2594 "loc": { 2595 "start": { 2596 "line": 34, 2597 "column": 76, 2598 "program": "test_generic.ts" 2599 }, 2600 "end": { 2601 "line": 34, 2602 "column": 77, 2603 "program": "test_generic.ts" 2604 } 2605 } 2606 }, 2607 "default": { 2608 "type": "TSBooleanKeyword", 2609 "loc": { 2610 "start": { 2611 "line": 34, 2612 "column": 80, 2613 "program": "test_generic.ts" 2614 }, 2615 "end": { 2616 "line": 34, 2617 "column": 87, 2618 "program": "test_generic.ts" 2619 } 2620 } 2621 }, 2622 "loc": { 2623 "start": { 2624 "line": 34, 2625 "column": 76, 2626 "program": "test_generic.ts" 2627 }, 2628 "end": { 2629 "line": 34, 2630 "column": 88, 2631 "program": "test_generic.ts" 2632 } 2633 } 2634 } 2635 ], 2636 "loc": { 2637 "start": { 2638 "line": 34, 2639 "column": 12, 2640 "program": "test_generic.ts" 2641 }, 2642 "end": { 2643 "line": 34, 2644 "column": 88, 2645 "program": "test_generic.ts" 2646 } 2647 } 2648 }, 2649 "loc": { 2650 "start": { 2651 "line": 34, 2652 "column": 1, 2653 "program": "test_generic.ts" 2654 }, 2655 "end": { 2656 "line": 37, 2657 "column": 2, 2658 "program": "test_generic.ts" 2659 } 2660 } 2661 }, 2662 { 2663 "type": "ExpressionStatement", 2664 "expression": { 2665 "type": "CallExpression", 2666 "callee": { 2667 "type": "Identifier", 2668 "name": "func1", 2669 "decorators": [], 2670 "loc": { 2671 "start": { 2672 "line": 39, 2673 "column": 1, 2674 "program": "test_generic.ts" 2675 }, 2676 "end": { 2677 "line": 39, 2678 "column": 6, 2679 "program": "test_generic.ts" 2680 } 2681 } 2682 }, 2683 "arguments": [], 2684 "optional": false, 2685 "typeParameters": { 2686 "type": "TSTypeParameterInstantiation", 2687 "params": [ 2688 { 2689 "type": "TSNumberKeyword", 2690 "loc": { 2691 "start": { 2692 "line": 39, 2693 "column": 7, 2694 "program": "test_generic.ts" 2695 }, 2696 "end": { 2697 "line": 39, 2698 "column": 13, 2699 "program": "test_generic.ts" 2700 } 2701 } 2702 }, 2703 { 2704 "type": "TSStringKeyword", 2705 "loc": { 2706 "start": { 2707 "line": 39, 2708 "column": 15, 2709 "program": "test_generic.ts" 2710 }, 2711 "end": { 2712 "line": 39, 2713 "column": 21, 2714 "program": "test_generic.ts" 2715 } 2716 } 2717 }, 2718 { 2719 "type": "TSTupleType", 2720 "elementTypes": [ 2721 { 2722 "type": "TSLiteralType", 2723 "literal": { 2724 "type": "NumberLiteral", 2725 "value": 1, 2726 "loc": { 2727 "start": { 2728 "line": 39, 2729 "column": 24, 2730 "program": "test_generic.ts" 2731 }, 2732 "end": { 2733 "line": 39, 2734 "column": 25, 2735 "program": "test_generic.ts" 2736 } 2737 } 2738 }, 2739 "loc": { 2740 "start": { 2741 "line": 39, 2742 "column": 24, 2743 "program": "test_generic.ts" 2744 }, 2745 "end": { 2746 "line": 39, 2747 "column": 26, 2748 "program": "test_generic.ts" 2749 } 2750 } 2751 }, 2752 { 2753 "type": "TSLiteralType", 2754 "literal": { 2755 "type": "NumberLiteral", 2756 "value": 2, 2757 "loc": { 2758 "start": { 2759 "line": 39, 2760 "column": 27, 2761 "program": "test_generic.ts" 2762 }, 2763 "end": { 2764 "line": 39, 2765 "column": 28, 2766 "program": "test_generic.ts" 2767 } 2768 } 2769 }, 2770 "loc": { 2771 "start": { 2772 "line": 39, 2773 "column": 27, 2774 "program": "test_generic.ts" 2775 }, 2776 "end": { 2777 "line": 39, 2778 "column": 29, 2779 "program": "test_generic.ts" 2780 } 2781 } 2782 }, 2783 { 2784 "type": "TSLiteralType", 2785 "literal": { 2786 "type": "NumberLiteral", 2787 "value": 3, 2788 "loc": { 2789 "start": { 2790 "line": 39, 2791 "column": 30, 2792 "program": "test_generic.ts" 2793 }, 2794 "end": { 2795 "line": 39, 2796 "column": 31, 2797 "program": "test_generic.ts" 2798 } 2799 } 2800 }, 2801 "loc": { 2802 "start": { 2803 "line": 39, 2804 "column": 30, 2805 "program": "test_generic.ts" 2806 }, 2807 "end": { 2808 "line": 39, 2809 "column": 32, 2810 "program": "test_generic.ts" 2811 } 2812 } 2813 } 2814 ], 2815 "loc": { 2816 "start": { 2817 "line": 39, 2818 "column": 23, 2819 "program": "test_generic.ts" 2820 }, 2821 "end": { 2822 "line": 39, 2823 "column": 32, 2824 "program": "test_generic.ts" 2825 } 2826 } 2827 } 2828 ], 2829 "loc": { 2830 "start": { 2831 "line": 39, 2832 "column": 6, 2833 "program": "test_generic.ts" 2834 }, 2835 "end": { 2836 "line": 39, 2837 "column": 33, 2838 "program": "test_generic.ts" 2839 } 2840 } 2841 }, 2842 "loc": { 2843 "start": { 2844 "line": 39, 2845 "column": 1, 2846 "program": "test_generic.ts" 2847 }, 2848 "end": { 2849 "line": 39, 2850 "column": 35, 2851 "program": "test_generic.ts" 2852 } 2853 } 2854 }, 2855 "loc": { 2856 "start": { 2857 "line": 39, 2858 "column": 1, 2859 "program": "test_generic.ts" 2860 }, 2861 "end": { 2862 "line": 39, 2863 "column": 35, 2864 "program": "test_generic.ts" 2865 } 2866 } 2867 }, 2868 { 2869 "type": "ExpressionStatement", 2870 "expression": { 2871 "type": "CallExpression", 2872 "callee": { 2873 "type": "Identifier", 2874 "name": "func2", 2875 "decorators": [], 2876 "loc": { 2877 "start": { 2878 "line": 40, 2879 "column": 1, 2880 "program": "test_generic.ts" 2881 }, 2882 "end": { 2883 "line": 40, 2884 "column": 6, 2885 "program": "test_generic.ts" 2886 } 2887 } 2888 }, 2889 "arguments": [], 2890 "optional": false, 2891 "typeParameters": { 2892 "type": "TSTypeParameterInstantiation", 2893 "params": [ 2894 { 2895 "type": "TSFunctionType", 2896 "params": [], 2897 "typeParameters": { 2898 "type": "TSTypeParameterDeclaration", 2899 "params": [ 2900 { 2901 "type": "TSTypeParameter", 2902 "name": { 2903 "type": "Identifier", 2904 "name": "A", 2905 "decorators": [], 2906 "loc": { 2907 "start": { 2908 "line": 40, 2909 "column": 8, 2910 "program": "test_generic.ts" 2911 }, 2912 "end": { 2913 "line": 40, 2914 "column": 9, 2915 "program": "test_generic.ts" 2916 } 2917 } 2918 }, 2919 "loc": { 2920 "start": { 2921 "line": 40, 2922 "column": 8, 2923 "program": "test_generic.ts" 2924 }, 2925 "end": { 2926 "line": 40, 2927 "column": 10, 2928 "program": "test_generic.ts" 2929 } 2930 } 2931 } 2932 ], 2933 "loc": { 2934 "start": { 2935 "line": 40, 2936 "column": 7, 2937 "program": "test_generic.ts" 2938 }, 2939 "end": { 2940 "line": 40, 2941 "column": 10, 2942 "program": "test_generic.ts" 2943 } 2944 } 2945 }, 2946 "returnType": { 2947 "type": "TSTypeLiteral", 2948 "members": [], 2949 "loc": { 2950 "start": { 2951 "line": 40, 2952 "column": 16, 2953 "program": "test_generic.ts" 2954 }, 2955 "end": { 2956 "line": 40, 2957 "column": 18, 2958 "program": "test_generic.ts" 2959 } 2960 } 2961 }, 2962 "loc": { 2963 "start": { 2964 "line": 40, 2965 "column": 7, 2966 "program": "test_generic.ts" 2967 }, 2968 "end": { 2969 "line": 40, 2970 "column": 18, 2971 "program": "test_generic.ts" 2972 } 2973 } 2974 } 2975 ], 2976 "loc": { 2977 "start": { 2978 "line": 40, 2979 "column": 6, 2980 "program": "test_generic.ts" 2981 }, 2982 "end": { 2983 "line": 40, 2984 "column": 19, 2985 "program": "test_generic.ts" 2986 } 2987 } 2988 }, 2989 "loc": { 2990 "start": { 2991 "line": 40, 2992 "column": 1, 2993 "program": "test_generic.ts" 2994 }, 2995 "end": { 2996 "line": 40, 2997 "column": 21, 2998 "program": "test_generic.ts" 2999 } 3000 } 3001 }, 3002 "loc": { 3003 "start": { 3004 "line": 40, 3005 "column": 1, 3006 "program": "test_generic.ts" 3007 }, 3008 "end": { 3009 "line": 40, 3010 "column": 22, 3011 "program": "test_generic.ts" 3012 } 3013 } 3014 }, 3015 { 3016 "type": "VariableDeclaration", 3017 "declarations": [ 3018 { 3019 "type": "VariableDeclarator", 3020 "id": { 3021 "type": "Identifier", 3022 "name": "o", 3023 "decorators": [], 3024 "loc": { 3025 "start": { 3026 "line": 42, 3027 "column": 5, 3028 "program": "test_generic.ts" 3029 }, 3030 "end": { 3031 "line": 42, 3032 "column": 6, 3033 "program": "test_generic.ts" 3034 } 3035 } 3036 }, 3037 "init": { 3038 "type": "ObjectExpression", 3039 "properties": [ 3040 { 3041 "type": "Property", 3042 "method": false, 3043 "shorthand": false, 3044 "computed": false, 3045 "key": { 3046 "type": "Identifier", 3047 "name": "a", 3048 "decorators": [], 3049 "loc": { 3050 "start": { 3051 "line": 43, 3052 "column": 5, 3053 "program": "test_generic.ts" 3054 }, 3055 "end": { 3056 "line": 43, 3057 "column": 6, 3058 "program": "test_generic.ts" 3059 } 3060 } 3061 }, 3062 "value": { 3063 "type": "FunctionExpression", 3064 "function": { 3065 "type": "ScriptFunction", 3066 "id": null, 3067 "generator": false, 3068 "async": false, 3069 "expression": false, 3070 "params": [], 3071 "typeParameters": { 3072 "type": "TSTypeParameterDeclaration", 3073 "params": [ 3074 { 3075 "type": "TSTypeParameter", 3076 "name": { 3077 "type": "Identifier", 3078 "name": "B", 3079 "decorators": [], 3080 "loc": { 3081 "start": { 3082 "line": 43, 3083 "column": 18, 3084 "program": "test_generic.ts" 3085 }, 3086 "end": { 3087 "line": 43, 3088 "column": 19, 3089 "program": "test_generic.ts" 3090 } 3091 } 3092 }, 3093 "loc": { 3094 "start": { 3095 "line": 43, 3096 "column": 18, 3097 "program": "test_generic.ts" 3098 }, 3099 "end": { 3100 "line": 43, 3101 "column": 20, 3102 "program": "test_generic.ts" 3103 } 3104 } 3105 }, 3106 { 3107 "type": "TSTypeParameter", 3108 "name": { 3109 "type": "Identifier", 3110 "name": "C", 3111 "decorators": [], 3112 "loc": { 3113 "start": { 3114 "line": 43, 3115 "column": 21, 3116 "program": "test_generic.ts" 3117 }, 3118 "end": { 3119 "line": 43, 3120 "column": 22, 3121 "program": "test_generic.ts" 3122 } 3123 } 3124 }, 3125 "constraint": { 3126 "type": "TSTypeQuery", 3127 "exprName": { 3128 "type": "Identifier", 3129 "name": "func1", 3130 "decorators": [], 3131 "loc": { 3132 "start": { 3133 "line": 43, 3134 "column": 38, 3135 "program": "test_generic.ts" 3136 }, 3137 "end": { 3138 "line": 43, 3139 "column": 43, 3140 "program": "test_generic.ts" 3141 } 3142 } 3143 }, 3144 "loc": { 3145 "start": { 3146 "line": 43, 3147 "column": 31, 3148 "program": "test_generic.ts" 3149 }, 3150 "end": { 3151 "line": 43, 3152 "column": 43, 3153 "program": "test_generic.ts" 3154 } 3155 } 3156 }, 3157 "loc": { 3158 "start": { 3159 "line": 43, 3160 "column": 21, 3161 "program": "test_generic.ts" 3162 }, 3163 "end": { 3164 "line": 43, 3165 "column": 44, 3166 "program": "test_generic.ts" 3167 } 3168 } 3169 } 3170 ], 3171 "loc": { 3172 "start": { 3173 "line": 43, 3174 "column": 17, 3175 "program": "test_generic.ts" 3176 }, 3177 "end": { 3178 "line": 43, 3179 "column": 44, 3180 "program": "test_generic.ts" 3181 } 3182 } 3183 }, 3184 "body": { 3185 "type": "BlockStatement", 3186 "statements": [], 3187 "loc": { 3188 "start": { 3189 "line": 43, 3190 "column": 47, 3191 "program": "test_generic.ts" 3192 }, 3193 "end": { 3194 "line": 43, 3195 "column": 50, 3196 "program": "test_generic.ts" 3197 } 3198 } 3199 }, 3200 "loc": { 3201 "start": { 3202 "line": 43, 3203 "column": 8, 3204 "program": "test_generic.ts" 3205 }, 3206 "end": { 3207 "line": 43, 3208 "column": 50, 3209 "program": "test_generic.ts" 3210 } 3211 } 3212 }, 3213 "loc": { 3214 "start": { 3215 "line": 43, 3216 "column": 8, 3217 "program": "test_generic.ts" 3218 }, 3219 "end": { 3220 "line": 43, 3221 "column": 50, 3222 "program": "test_generic.ts" 3223 } 3224 } 3225 }, 3226 "kind": "init", 3227 "loc": { 3228 "start": { 3229 "line": 43, 3230 "column": 5, 3231 "program": "test_generic.ts" 3232 }, 3233 "end": { 3234 "line": 43, 3235 "column": 50, 3236 "program": "test_generic.ts" 3237 } 3238 } 3239 }, 3240 { 3241 "type": "Property", 3242 "method": false, 3243 "shorthand": false, 3244 "computed": false, 3245 "key": { 3246 "type": "Identifier", 3247 "name": "b", 3248 "decorators": [], 3249 "loc": { 3250 "start": { 3251 "line": 44, 3252 "column": 5, 3253 "program": "test_generic.ts" 3254 }, 3255 "end": { 3256 "line": 44, 3257 "column": 6, 3258 "program": "test_generic.ts" 3259 } 3260 } 3261 }, 3262 "value": { 3263 "type": "FunctionExpression", 3264 "function": { 3265 "type": "ScriptFunction", 3266 "id": null, 3267 "generator": false, 3268 "async": false, 3269 "expression": false, 3270 "params": [], 3271 "typeParameters": { 3272 "type": "TSTypeParameterDeclaration", 3273 "params": [ 3274 { 3275 "type": "TSTypeParameter", 3276 "name": { 3277 "type": "Identifier", 3278 "name": "D", 3279 "decorators": [], 3280 "loc": { 3281 "start": { 3282 "line": 44, 3283 "column": 18, 3284 "program": "test_generic.ts" 3285 }, 3286 "end": { 3287 "line": 44, 3288 "column": 19, 3289 "program": "test_generic.ts" 3290 } 3291 } 3292 }, 3293 "default": { 3294 "type": "TSNumberKeyword", 3295 "loc": { 3296 "start": { 3297 "line": 44, 3298 "column": 22, 3299 "program": "test_generic.ts" 3300 }, 3301 "end": { 3302 "line": 44, 3303 "column": 28, 3304 "program": "test_generic.ts" 3305 } 3306 } 3307 }, 3308 "loc": { 3309 "start": { 3310 "line": 44, 3311 "column": 18, 3312 "program": "test_generic.ts" 3313 }, 3314 "end": { 3315 "line": 44, 3316 "column": 29, 3317 "program": "test_generic.ts" 3318 } 3319 } 3320 }, 3321 { 3322 "type": "TSTypeParameter", 3323 "name": { 3324 "type": "Identifier", 3325 "name": "T", 3326 "decorators": [], 3327 "loc": { 3328 "start": { 3329 "line": 44, 3330 "column": 30, 3331 "program": "test_generic.ts" 3332 }, 3333 "end": { 3334 "line": 44, 3335 "column": 31, 3336 "program": "test_generic.ts" 3337 } 3338 } 3339 }, 3340 "default": { 3341 "type": "TSStringKeyword", 3342 "loc": { 3343 "start": { 3344 "line": 44, 3345 "column": 34, 3346 "program": "test_generic.ts" 3347 }, 3348 "end": { 3349 "line": 44, 3350 "column": 40, 3351 "program": "test_generic.ts" 3352 } 3353 } 3354 }, 3355 "loc": { 3356 "start": { 3357 "line": 44, 3358 "column": 30, 3359 "program": "test_generic.ts" 3360 }, 3361 "end": { 3362 "line": 44, 3363 "column": 41, 3364 "program": "test_generic.ts" 3365 } 3366 } 3367 } 3368 ], 3369 "loc": { 3370 "start": { 3371 "line": 44, 3372 "column": 17, 3373 "program": "test_generic.ts" 3374 }, 3375 "end": { 3376 "line": 44, 3377 "column": 41, 3378 "program": "test_generic.ts" 3379 } 3380 } 3381 }, 3382 "body": { 3383 "type": "BlockStatement", 3384 "statements": [], 3385 "loc": { 3386 "start": { 3387 "line": 44, 3388 "column": 44, 3389 "program": "test_generic.ts" 3390 }, 3391 "end": { 3392 "line": 44, 3393 "column": 47, 3394 "program": "test_generic.ts" 3395 } 3396 } 3397 }, 3398 "loc": { 3399 "start": { 3400 "line": 44, 3401 "column": 8, 3402 "program": "test_generic.ts" 3403 }, 3404 "end": { 3405 "line": 44, 3406 "column": 47, 3407 "program": "test_generic.ts" 3408 } 3409 } 3410 }, 3411 "loc": { 3412 "start": { 3413 "line": 44, 3414 "column": 8, 3415 "program": "test_generic.ts" 3416 }, 3417 "end": { 3418 "line": 44, 3419 "column": 47, 3420 "program": "test_generic.ts" 3421 } 3422 } 3423 }, 3424 "kind": "init", 3425 "loc": { 3426 "start": { 3427 "line": 44, 3428 "column": 5, 3429 "program": "test_generic.ts" 3430 }, 3431 "end": { 3432 "line": 44, 3433 "column": 47, 3434 "program": "test_generic.ts" 3435 } 3436 } 3437 }, 3438 { 3439 "type": "Property", 3440 "method": true, 3441 "shorthand": false, 3442 "computed": false, 3443 "key": { 3444 "type": "Identifier", 3445 "name": "c", 3446 "decorators": [], 3447 "loc": { 3448 "start": { 3449 "line": 45, 3450 "column": 5, 3451 "program": "test_generic.ts" 3452 }, 3453 "end": { 3454 "line": 45, 3455 "column": 6, 3456 "program": "test_generic.ts" 3457 } 3458 } 3459 }, 3460 "value": { 3461 "type": "FunctionExpression", 3462 "function": { 3463 "type": "ScriptFunction", 3464 "id": null, 3465 "generator": false, 3466 "async": false, 3467 "expression": false, 3468 "params": [], 3469 "typeParameters": { 3470 "type": "TSTypeParameterDeclaration", 3471 "params": [ 3472 { 3473 "type": "TSTypeParameter", 3474 "name": { 3475 "type": "Identifier", 3476 "name": "E", 3477 "decorators": [], 3478 "loc": { 3479 "start": { 3480 "line": 45, 3481 "column": 7, 3482 "program": "test_generic.ts" 3483 }, 3484 "end": { 3485 "line": 45, 3486 "column": 8, 3487 "program": "test_generic.ts" 3488 } 3489 } 3490 }, 3491 "loc": { 3492 "start": { 3493 "line": 45, 3494 "column": 7, 3495 "program": "test_generic.ts" 3496 }, 3497 "end": { 3498 "line": 45, 3499 "column": 9, 3500 "program": "test_generic.ts" 3501 } 3502 } 3503 }, 3504 { 3505 "type": "TSTypeParameter", 3506 "name": { 3507 "type": "Identifier", 3508 "name": "F", 3509 "decorators": [], 3510 "loc": { 3511 "start": { 3512 "line": 45, 3513 "column": 10, 3514 "program": "test_generic.ts" 3515 }, 3516 "end": { 3517 "line": 45, 3518 "column": 11, 3519 "program": "test_generic.ts" 3520 } 3521 } 3522 }, 3523 "constraint": { 3524 "type": "TSTypeOperator", 3525 "operator": "readonly", 3526 "typeAnnotation": { 3527 "type": "TSTupleType", 3528 "elementTypes": [], 3529 "loc": { 3530 "start": { 3531 "line": 45, 3532 "column": 29, 3533 "program": "test_generic.ts" 3534 }, 3535 "end": { 3536 "line": 45, 3537 "column": 31, 3538 "program": "test_generic.ts" 3539 } 3540 } 3541 }, 3542 "loc": { 3543 "start": { 3544 "line": 45, 3545 "column": 20, 3546 "program": "test_generic.ts" 3547 }, 3548 "end": { 3549 "line": 45, 3550 "column": 31, 3551 "program": "test_generic.ts" 3552 } 3553 } 3554 }, 3555 "loc": { 3556 "start": { 3557 "line": 45, 3558 "column": 10, 3559 "program": "test_generic.ts" 3560 }, 3561 "end": { 3562 "line": 45, 3563 "column": 32, 3564 "program": "test_generic.ts" 3565 } 3566 } 3567 } 3568 ], 3569 "loc": { 3570 "start": { 3571 "line": 45, 3572 "column": 6, 3573 "program": "test_generic.ts" 3574 }, 3575 "end": { 3576 "line": 45, 3577 "column": 32, 3578 "program": "test_generic.ts" 3579 } 3580 } 3581 }, 3582 "body": { 3583 "type": "BlockStatement", 3584 "statements": [], 3585 "loc": { 3586 "start": { 3587 "line": 45, 3588 "column": 35, 3589 "program": "test_generic.ts" 3590 }, 3591 "end": { 3592 "line": 45, 3593 "column": 38, 3594 "program": "test_generic.ts" 3595 } 3596 } 3597 }, 3598 "loc": { 3599 "start": { 3600 "line": 45, 3601 "column": 6, 3602 "program": "test_generic.ts" 3603 }, 3604 "end": { 3605 "line": 45, 3606 "column": 38, 3607 "program": "test_generic.ts" 3608 } 3609 } 3610 }, 3611 "loc": { 3612 "start": { 3613 "line": 45, 3614 "column": 6, 3615 "program": "test_generic.ts" 3616 }, 3617 "end": { 3618 "line": 45, 3619 "column": 38, 3620 "program": "test_generic.ts" 3621 } 3622 } 3623 }, 3624 "kind": "init", 3625 "loc": { 3626 "start": { 3627 "line": 45, 3628 "column": 5, 3629 "program": "test_generic.ts" 3630 }, 3631 "end": { 3632 "line": 45, 3633 "column": 38, 3634 "program": "test_generic.ts" 3635 } 3636 } 3637 } 3638 ], 3639 "loc": { 3640 "start": { 3641 "line": 42, 3642 "column": 9, 3643 "program": "test_generic.ts" 3644 }, 3645 "end": { 3646 "line": 46, 3647 "column": 2, 3648 "program": "test_generic.ts" 3649 } 3650 } 3651 }, 3652 "loc": { 3653 "start": { 3654 "line": 42, 3655 "column": 5, 3656 "program": "test_generic.ts" 3657 }, 3658 "end": { 3659 "line": 46, 3660 "column": 2, 3661 "program": "test_generic.ts" 3662 } 3663 } 3664 } 3665 ], 3666 "kind": "var", 3667 "loc": { 3668 "start": { 3669 "line": 42, 3670 "column": 1, 3671 "program": "test_generic.ts" 3672 }, 3673 "end": { 3674 "line": 46, 3675 "column": 2, 3676 "program": "test_generic.ts" 3677 } 3678 } 3679 }, 3680 { 3681 "type": "ClassDeclaration", 3682 "definition": { 3683 "id": { 3684 "type": "Identifier", 3685 "name": "A", 3686 "decorators": [], 3687 "loc": { 3688 "start": { 3689 "line": 48, 3690 "column": 7, 3691 "program": "test_generic.ts" 3692 }, 3693 "end": { 3694 "line": 48, 3695 "column": 8, 3696 "program": "test_generic.ts" 3697 } 3698 } 3699 }, 3700 "typeParameters": { 3701 "type": "TSTypeParameterDeclaration", 3702 "params": [ 3703 { 3704 "type": "TSTypeParameter", 3705 "name": { 3706 "type": "Identifier", 3707 "name": "T", 3708 "decorators": [], 3709 "loc": { 3710 "start": { 3711 "line": 48, 3712 "column": 9, 3713 "program": "test_generic.ts" 3714 }, 3715 "end": { 3716 "line": 48, 3717 "column": 10, 3718 "program": "test_generic.ts" 3719 } 3720 } 3721 }, 3722 "constraint": { 3723 "type": "TSTypeReference", 3724 "typeName": { 3725 "type": "Identifier", 3726 "name": "B", 3727 "decorators": [], 3728 "loc": { 3729 "start": { 3730 "line": 48, 3731 "column": 19, 3732 "program": "test_generic.ts" 3733 }, 3734 "end": { 3735 "line": 48, 3736 "column": 20, 3737 "program": "test_generic.ts" 3738 } 3739 } 3740 }, 3741 "loc": { 3742 "start": { 3743 "line": 48, 3744 "column": 19, 3745 "program": "test_generic.ts" 3746 }, 3747 "end": { 3748 "line": 48, 3749 "column": 20, 3750 "program": "test_generic.ts" 3751 } 3752 } 3753 }, 3754 "loc": { 3755 "start": { 3756 "line": 48, 3757 "column": 9, 3758 "program": "test_generic.ts" 3759 }, 3760 "end": { 3761 "line": 48, 3762 "column": 21, 3763 "program": "test_generic.ts" 3764 } 3765 } 3766 }, 3767 { 3768 "type": "TSTypeParameter", 3769 "name": { 3770 "type": "Identifier", 3771 "name": "Z", 3772 "decorators": [], 3773 "loc": { 3774 "start": { 3775 "line": 48, 3776 "column": 22, 3777 "program": "test_generic.ts" 3778 }, 3779 "end": { 3780 "line": 48, 3781 "column": 23, 3782 "program": "test_generic.ts" 3783 } 3784 } 3785 }, 3786 "default": { 3787 "type": "TSTypeLiteral", 3788 "members": [ 3789 { 3790 "type": "TSPropertySignature", 3791 "computed": false, 3792 "optional": false, 3793 "readonly": false, 3794 "key": { 3795 "type": "Identifier", 3796 "name": "a", 3797 "decorators": [], 3798 "loc": { 3799 "start": { 3800 "line": 48, 3801 "column": 28, 3802 "program": "test_generic.ts" 3803 }, 3804 "end": { 3805 "line": 48, 3806 "column": 29, 3807 "program": "test_generic.ts" 3808 } 3809 } 3810 }, 3811 "typeAnnotation": { 3812 "type": "TSNumberKeyword", 3813 "loc": { 3814 "start": { 3815 "line": 48, 3816 "column": 31, 3817 "program": "test_generic.ts" 3818 }, 3819 "end": { 3820 "line": 48, 3821 "column": 37, 3822 "program": "test_generic.ts" 3823 } 3824 } 3825 }, 3826 "loc": { 3827 "start": { 3828 "line": 48, 3829 "column": 28, 3830 "program": "test_generic.ts" 3831 }, 3832 "end": { 3833 "line": 48, 3834 "column": 38, 3835 "program": "test_generic.ts" 3836 } 3837 } 3838 }, 3839 { 3840 "type": "TSPropertySignature", 3841 "computed": false, 3842 "optional": false, 3843 "readonly": false, 3844 "key": { 3845 "type": "Identifier", 3846 "name": "b", 3847 "decorators": [], 3848 "loc": { 3849 "start": { 3850 "line": 48, 3851 "column": 39, 3852 "program": "test_generic.ts" 3853 }, 3854 "end": { 3855 "line": 48, 3856 "column": 40, 3857 "program": "test_generic.ts" 3858 } 3859 } 3860 }, 3861 "typeAnnotation": { 3862 "type": "TSStringKeyword", 3863 "loc": { 3864 "start": { 3865 "line": 48, 3866 "column": 42, 3867 "program": "test_generic.ts" 3868 }, 3869 "end": { 3870 "line": 48, 3871 "column": 48, 3872 "program": "test_generic.ts" 3873 } 3874 } 3875 }, 3876 "loc": { 3877 "start": { 3878 "line": 48, 3879 "column": 39, 3880 "program": "test_generic.ts" 3881 }, 3882 "end": { 3883 "line": 48, 3884 "column": 50, 3885 "program": "test_generic.ts" 3886 } 3887 } 3888 } 3889 ], 3890 "loc": { 3891 "start": { 3892 "line": 48, 3893 "column": 26, 3894 "program": "test_generic.ts" 3895 }, 3896 "end": { 3897 "line": 48, 3898 "column": 50, 3899 "program": "test_generic.ts" 3900 } 3901 } 3902 }, 3903 "loc": { 3904 "start": { 3905 "line": 48, 3906 "column": 22, 3907 "program": "test_generic.ts" 3908 }, 3909 "end": { 3910 "line": 48, 3911 "column": 51, 3912 "program": "test_generic.ts" 3913 } 3914 } 3915 } 3916 ], 3917 "loc": { 3918 "start": { 3919 "line": 48, 3920 "column": 8, 3921 "program": "test_generic.ts" 3922 }, 3923 "end": { 3924 "line": 48, 3925 "column": 51, 3926 "program": "test_generic.ts" 3927 } 3928 } 3929 }, 3930 "superClass": null, 3931 "implements": [], 3932 "constructor": { 3933 "type": "MethodDefinition", 3934 "key": { 3935 "type": "Identifier", 3936 "name": "constructor", 3937 "decorators": [], 3938 "loc": { 3939 "start": { 3940 "line": 48, 3941 "column": 53, 3942 "program": "test_generic.ts" 3943 }, 3944 "end": { 3945 "line": 48, 3946 "column": 53, 3947 "program": "test_generic.ts" 3948 } 3949 } 3950 }, 3951 "kind": "constructor", 3952 "static": false, 3953 "optional": false, 3954 "computed": false, 3955 "value": { 3956 "type": "FunctionExpression", 3957 "function": { 3958 "type": "ScriptFunction", 3959 "id": null, 3960 "generator": false, 3961 "async": false, 3962 "expression": false, 3963 "params": [], 3964 "body": { 3965 "type": "BlockStatement", 3966 "statements": [], 3967 "loc": { 3968 "start": { 3969 "line": 48, 3970 "column": 53, 3971 "program": "test_generic.ts" 3972 }, 3973 "end": { 3974 "line": 48, 3975 "column": 53, 3976 "program": "test_generic.ts" 3977 } 3978 } 3979 }, 3980 "loc": { 3981 "start": { 3982 "line": 48, 3983 "column": 53, 3984 "program": "test_generic.ts" 3985 }, 3986 "end": { 3987 "line": 48, 3988 "column": 53, 3989 "program": "test_generic.ts" 3990 } 3991 } 3992 }, 3993 "loc": { 3994 "start": { 3995 "line": 48, 3996 "column": 53, 3997 "program": "test_generic.ts" 3998 }, 3999 "end": { 4000 "line": 48, 4001 "column": 53, 4002 "program": "test_generic.ts" 4003 } 4004 } 4005 }, 4006 "overloads": [], 4007 "decorators": [], 4008 "loc": { 4009 "start": { 4010 "line": 1, 4011 "column": 1, 4012 "program": null 4013 }, 4014 "end": { 4015 "line": 1, 4016 "column": 1, 4017 "program": null 4018 } 4019 } 4020 }, 4021 "body": [ 4022 { 4023 "type": "MethodDefinition", 4024 "key": { 4025 "type": "Identifier", 4026 "name": "a", 4027 "decorators": [], 4028 "loc": { 4029 "start": { 4030 "line": 49, 4031 "column": 12, 4032 "program": "test_generic.ts" 4033 }, 4034 "end": { 4035 "line": 49, 4036 "column": 13, 4037 "program": "test_generic.ts" 4038 } 4039 } 4040 }, 4041 "kind": "method", 4042 "accessibility": "public", 4043 "static": false, 4044 "optional": false, 4045 "computed": false, 4046 "value": { 4047 "type": "FunctionExpression", 4048 "function": { 4049 "type": "ScriptFunction", 4050 "id": null, 4051 "generator": false, 4052 "async": false, 4053 "expression": false, 4054 "params": [], 4055 "typeParameters": { 4056 "type": "TSTypeParameterDeclaration", 4057 "params": [ 4058 { 4059 "type": "TSTypeParameter", 4060 "name": { 4061 "type": "Identifier", 4062 "name": "T", 4063 "decorators": [], 4064 "loc": { 4065 "start": { 4066 "line": 49, 4067 "column": 14, 4068 "program": "test_generic.ts" 4069 }, 4070 "end": { 4071 "line": 49, 4072 "column": 15, 4073 "program": "test_generic.ts" 4074 } 4075 } 4076 }, 4077 "loc": { 4078 "start": { 4079 "line": 49, 4080 "column": 14, 4081 "program": "test_generic.ts" 4082 }, 4083 "end": { 4084 "line": 49, 4085 "column": 16, 4086 "program": "test_generic.ts" 4087 } 4088 } 4089 }, 4090 { 4091 "type": "TSTypeParameter", 4092 "name": { 4093 "type": "Identifier", 4094 "name": "R", 4095 "decorators": [], 4096 "loc": { 4097 "start": { 4098 "line": 49, 4099 "column": 17, 4100 "program": "test_generic.ts" 4101 }, 4102 "end": { 4103 "line": 49, 4104 "column": 18, 4105 "program": "test_generic.ts" 4106 } 4107 } 4108 }, 4109 "loc": { 4110 "start": { 4111 "line": 49, 4112 "column": 17, 4113 "program": "test_generic.ts" 4114 }, 4115 "end": { 4116 "line": 49, 4117 "column": 19, 4118 "program": "test_generic.ts" 4119 } 4120 } 4121 } 4122 ], 4123 "loc": { 4124 "start": { 4125 "line": 49, 4126 "column": 13, 4127 "program": "test_generic.ts" 4128 }, 4129 "end": { 4130 "line": 49, 4131 "column": 19, 4132 "program": "test_generic.ts" 4133 } 4134 } 4135 }, 4136 "body": { 4137 "type": "BlockStatement", 4138 "statements": [], 4139 "loc": { 4140 "start": { 4141 "line": 49, 4142 "column": 22, 4143 "program": "test_generic.ts" 4144 }, 4145 "end": { 4146 "line": 49, 4147 "column": 25, 4148 "program": "test_generic.ts" 4149 } 4150 } 4151 }, 4152 "loc": { 4153 "start": { 4154 "line": 49, 4155 "column": 13, 4156 "program": "test_generic.ts" 4157 }, 4158 "end": { 4159 "line": 49, 4160 "column": 25, 4161 "program": "test_generic.ts" 4162 } 4163 } 4164 }, 4165 "loc": { 4166 "start": { 4167 "line": 49, 4168 "column": 13, 4169 "program": "test_generic.ts" 4170 }, 4171 "end": { 4172 "line": 49, 4173 "column": 25, 4174 "program": "test_generic.ts" 4175 } 4176 } 4177 }, 4178 "overloads": [], 4179 "decorators": [], 4180 "loc": { 4181 "start": { 4182 "line": 49, 4183 "column": 5, 4184 "program": "test_generic.ts" 4185 }, 4186 "end": { 4187 "line": 49, 4188 "column": 25, 4189 "program": "test_generic.ts" 4190 } 4191 } 4192 }, 4193 { 4194 "type": "MethodDefinition", 4195 "key": { 4196 "type": "Identifier", 4197 "name": "b", 4198 "decorators": [], 4199 "loc": { 4200 "start": { 4201 "line": 50, 4202 "column": 13, 4203 "program": "test_generic.ts" 4204 }, 4205 "end": { 4206 "line": 50, 4207 "column": 14, 4208 "program": "test_generic.ts" 4209 } 4210 } 4211 }, 4212 "kind": "method", 4213 "accessibility": "private", 4214 "static": false, 4215 "optional": false, 4216 "computed": false, 4217 "value": { 4218 "type": "FunctionExpression", 4219 "function": { 4220 "type": "ScriptFunction", 4221 "id": null, 4222 "generator": false, 4223 "async": false, 4224 "expression": false, 4225 "params": [], 4226 "typeParameters": { 4227 "type": "TSTypeParameterDeclaration", 4228 "params": [ 4229 { 4230 "type": "TSTypeParameter", 4231 "name": { 4232 "type": "Identifier", 4233 "name": "E", 4234 "decorators": [], 4235 "loc": { 4236 "start": { 4237 "line": 50, 4238 "column": 15, 4239 "program": "test_generic.ts" 4240 }, 4241 "end": { 4242 "line": 50, 4243 "column": 16, 4244 "program": "test_generic.ts" 4245 } 4246 } 4247 }, 4248 "constraint": { 4249 "type": "TSFunctionType", 4250 "params": [ 4251 { 4252 "type": "Identifier", 4253 "name": "a", 4254 "typeAnnotation": { 4255 "type": "TSNumberKeyword", 4256 "loc": { 4257 "start": { 4258 "line": 50, 4259 "column": 29, 4260 "program": "test_generic.ts" 4261 }, 4262 "end": { 4263 "line": 50, 4264 "column": 35, 4265 "program": "test_generic.ts" 4266 } 4267 } 4268 }, 4269 "decorators": [], 4270 "loc": { 4271 "start": { 4272 "line": 50, 4273 "column": 26, 4274 "program": "test_generic.ts" 4275 }, 4276 "end": { 4277 "line": 50, 4278 "column": 27, 4279 "program": "test_generic.ts" 4280 } 4281 } 4282 }, 4283 { 4284 "type": "Identifier", 4285 "name": "b", 4286 "typeAnnotation": { 4287 "type": "TSStringKeyword", 4288 "loc": { 4289 "start": { 4290 "line": 50, 4291 "column": 40, 4292 "program": "test_generic.ts" 4293 }, 4294 "end": { 4295 "line": 50, 4296 "column": 46, 4297 "program": "test_generic.ts" 4298 } 4299 } 4300 }, 4301 "decorators": [], 4302 "loc": { 4303 "start": { 4304 "line": 50, 4305 "column": 37, 4306 "program": "test_generic.ts" 4307 }, 4308 "end": { 4309 "line": 50, 4310 "column": 38, 4311 "program": "test_generic.ts" 4312 } 4313 } 4314 } 4315 ], 4316 "returnType": { 4317 "type": "TSArrayType", 4318 "elementType": { 4319 "type": "TSAnyKeyword", 4320 "loc": { 4321 "start": { 4322 "line": 50, 4323 "column": 51, 4324 "program": "test_generic.ts" 4325 }, 4326 "end": { 4327 "line": 50, 4328 "column": 54, 4329 "program": "test_generic.ts" 4330 } 4331 } 4332 }, 4333 "annotations": [], 4334 "loc": { 4335 "start": { 4336 "line": 50, 4337 "column": 51, 4338 "program": "test_generic.ts" 4339 }, 4340 "end": { 4341 "line": 50, 4342 "column": 56, 4343 "program": "test_generic.ts" 4344 } 4345 } 4346 }, 4347 "loc": { 4348 "start": { 4349 "line": 50, 4350 "column": 25, 4351 "program": "test_generic.ts" 4352 }, 4353 "end": { 4354 "line": 50, 4355 "column": 56, 4356 "program": "test_generic.ts" 4357 } 4358 } 4359 }, 4360 "loc": { 4361 "start": { 4362 "line": 50, 4363 "column": 15, 4364 "program": "test_generic.ts" 4365 }, 4366 "end": { 4367 "line": 50, 4368 "column": 57, 4369 "program": "test_generic.ts" 4370 } 4371 } 4372 } 4373 ], 4374 "loc": { 4375 "start": { 4376 "line": 50, 4377 "column": 14, 4378 "program": "test_generic.ts" 4379 }, 4380 "end": { 4381 "line": 50, 4382 "column": 57, 4383 "program": "test_generic.ts" 4384 } 4385 } 4386 }, 4387 "body": { 4388 "type": "BlockStatement", 4389 "statements": [], 4390 "loc": { 4391 "start": { 4392 "line": 50, 4393 "column": 60, 4394 "program": "test_generic.ts" 4395 }, 4396 "end": { 4397 "line": 50, 4398 "column": 63, 4399 "program": "test_generic.ts" 4400 } 4401 } 4402 }, 4403 "loc": { 4404 "start": { 4405 "line": 50, 4406 "column": 14, 4407 "program": "test_generic.ts" 4408 }, 4409 "end": { 4410 "line": 50, 4411 "column": 63, 4412 "program": "test_generic.ts" 4413 } 4414 } 4415 }, 4416 "loc": { 4417 "start": { 4418 "line": 50, 4419 "column": 14, 4420 "program": "test_generic.ts" 4421 }, 4422 "end": { 4423 "line": 50, 4424 "column": 63, 4425 "program": "test_generic.ts" 4426 } 4427 } 4428 }, 4429 "overloads": [], 4430 "decorators": [], 4431 "loc": { 4432 "start": { 4433 "line": 50, 4434 "column": 5, 4435 "program": "test_generic.ts" 4436 }, 4437 "end": { 4438 "line": 50, 4439 "column": 63, 4440 "program": "test_generic.ts" 4441 } 4442 } 4443 } 4444 ], 4445 "loc": { 4446 "start": { 4447 "line": 48, 4448 "column": 52, 4449 "program": "test_generic.ts" 4450 }, 4451 "end": { 4452 "line": 53, 4453 "column": 6, 4454 "program": "test_generic.ts" 4455 } 4456 } 4457 }, 4458 "loc": { 4459 "start": { 4460 "line": 48, 4461 "column": 1, 4462 "program": "test_generic.ts" 4463 }, 4464 "end": { 4465 "line": 53, 4466 "column": 6, 4467 "program": "test_generic.ts" 4468 } 4469 } 4470 }, 4471 { 4472 "type": "ClassDeclaration", 4473 "definition": { 4474 "id": { 4475 "type": "Identifier", 4476 "name": "W", 4477 "decorators": [], 4478 "loc": { 4479 "start": { 4480 "line": 53, 4481 "column": 7, 4482 "program": "test_generic.ts" 4483 }, 4484 "end": { 4485 "line": 53, 4486 "column": 8, 4487 "program": "test_generic.ts" 4488 } 4489 } 4490 }, 4491 "superClass": { 4492 "type": "Identifier", 4493 "name": "T", 4494 "decorators": [], 4495 "loc": { 4496 "start": { 4497 "line": 53, 4498 "column": 17, 4499 "program": "test_generic.ts" 4500 }, 4501 "end": { 4502 "line": 53, 4503 "column": 18, 4504 "program": "test_generic.ts" 4505 } 4506 } 4507 }, 4508 "superTypeParameters": { 4509 "type": "TSTypeParameterInstantiation", 4510 "params": [ 4511 { 4512 "type": "TSFunctionType", 4513 "params": [], 4514 "typeParameters": { 4515 "type": "TSTypeParameterDeclaration", 4516 "params": [ 4517 { 4518 "type": "TSTypeParameter", 4519 "name": { 4520 "type": "Identifier", 4521 "name": "B", 4522 "decorators": [], 4523 "loc": { 4524 "start": { 4525 "line": 53, 4526 "column": 20, 4527 "program": "test_generic.ts" 4528 }, 4529 "end": { 4530 "line": 53, 4531 "column": 21, 4532 "program": "test_generic.ts" 4533 } 4534 } 4535 }, 4536 "loc": { 4537 "start": { 4538 "line": 53, 4539 "column": 20, 4540 "program": "test_generic.ts" 4541 }, 4542 "end": { 4543 "line": 53, 4544 "column": 22, 4545 "program": "test_generic.ts" 4546 } 4547 } 4548 } 4549 ], 4550 "loc": { 4551 "start": { 4552 "line": 53, 4553 "column": 19, 4554 "program": "test_generic.ts" 4555 }, 4556 "end": { 4557 "line": 53, 4558 "column": 22, 4559 "program": "test_generic.ts" 4560 } 4561 } 4562 }, 4563 "returnType": { 4564 "type": "TSNumberKeyword", 4565 "loc": { 4566 "start": { 4567 "line": 53, 4568 "column": 29, 4569 "program": "test_generic.ts" 4570 }, 4571 "end": { 4572 "line": 53, 4573 "column": 35, 4574 "program": "test_generic.ts" 4575 } 4576 } 4577 }, 4578 "loc": { 4579 "start": { 4580 "line": 53, 4581 "column": 19, 4582 "program": "test_generic.ts" 4583 }, 4584 "end": { 4585 "line": 53, 4586 "column": 35, 4587 "program": "test_generic.ts" 4588 } 4589 } 4590 }, 4591 { 4592 "type": "TSArrayType", 4593 "elementType": { 4594 "type": "TSTupleType", 4595 "elementTypes": [ 4596 { 4597 "type": "TSUnionType", 4598 "types": [ 4599 { 4600 "type": "TSNumberKeyword", 4601 "loc": { 4602 "start": { 4603 "line": 53, 4604 "column": 38, 4605 "program": "test_generic.ts" 4606 }, 4607 "end": { 4608 "line": 53, 4609 "column": 44, 4610 "program": "test_generic.ts" 4611 } 4612 } 4613 }, 4614 { 4615 "type": "TSStringKeyword", 4616 "loc": { 4617 "start": { 4618 "line": 53, 4619 "column": 47, 4620 "program": "test_generic.ts" 4621 }, 4622 "end": { 4623 "line": 53, 4624 "column": 53, 4625 "program": "test_generic.ts" 4626 } 4627 } 4628 } 4629 ], 4630 "loc": { 4631 "start": { 4632 "line": 53, 4633 "column": 38, 4634 "program": "test_generic.ts" 4635 }, 4636 "end": { 4637 "line": 53, 4638 "column": 54, 4639 "program": "test_generic.ts" 4640 } 4641 } 4642 } 4643 ], 4644 "loc": { 4645 "start": { 4646 "line": 53, 4647 "column": 37, 4648 "program": "test_generic.ts" 4649 }, 4650 "end": { 4651 "line": 53, 4652 "column": 54, 4653 "program": "test_generic.ts" 4654 } 4655 } 4656 }, 4657 "annotations": [], 4658 "loc": { 4659 "start": { 4660 "line": 53, 4661 "column": 37, 4662 "program": "test_generic.ts" 4663 }, 4664 "end": { 4665 "line": 53, 4666 "column": 56, 4667 "program": "test_generic.ts" 4668 } 4669 } 4670 } 4671 ], 4672 "loc": { 4673 "start": { 4674 "line": 53, 4675 "column": 18, 4676 "program": "test_generic.ts" 4677 }, 4678 "end": { 4679 "line": 53, 4680 "column": 57, 4681 "program": "test_generic.ts" 4682 } 4683 } 4684 }, 4685 "implements": [], 4686 "constructor": { 4687 "type": "MethodDefinition", 4688 "key": { 4689 "type": "Identifier", 4690 "name": "constructor", 4691 "decorators": [], 4692 "loc": { 4693 "start": { 4694 "line": 53, 4695 "column": 59, 4696 "program": "test_generic.ts" 4697 }, 4698 "end": { 4699 "line": 53, 4700 "column": 59, 4701 "program": "test_generic.ts" 4702 } 4703 } 4704 }, 4705 "kind": "constructor", 4706 "static": false, 4707 "optional": false, 4708 "computed": false, 4709 "value": { 4710 "type": "FunctionExpression", 4711 "function": { 4712 "type": "ScriptFunction", 4713 "id": null, 4714 "generator": false, 4715 "async": false, 4716 "expression": false, 4717 "params": [ 4718 { 4719 "type": "RestElement", 4720 "argument": { 4721 "type": "Identifier", 4722 "name": "args", 4723 "decorators": [], 4724 "loc": { 4725 "start": { 4726 "line": 53, 4727 "column": 59, 4728 "program": "test_generic.ts" 4729 }, 4730 "end": { 4731 "line": 53, 4732 "column": 59, 4733 "program": "test_generic.ts" 4734 } 4735 } 4736 }, 4737 "loc": { 4738 "start": { 4739 "line": 53, 4740 "column": 59, 4741 "program": "test_generic.ts" 4742 }, 4743 "end": { 4744 "line": 53, 4745 "column": 59, 4746 "program": "test_generic.ts" 4747 } 4748 } 4749 } 4750 ], 4751 "body": { 4752 "type": "BlockStatement", 4753 "statements": [ 4754 { 4755 "type": "ExpressionStatement", 4756 "expression": { 4757 "type": "CallExpression", 4758 "callee": { 4759 "type": "Super", 4760 "loc": { 4761 "start": { 4762 "line": 53, 4763 "column": 59, 4764 "program": "test_generic.ts" 4765 }, 4766 "end": { 4767 "line": 53, 4768 "column": 59, 4769 "program": "test_generic.ts" 4770 } 4771 } 4772 }, 4773 "arguments": [ 4774 { 4775 "type": "SpreadElement", 4776 "argument": { 4777 "type": "Identifier", 4778 "name": "args", 4779 "decorators": [], 4780 "loc": { 4781 "start": { 4782 "line": 53, 4783 "column": 59, 4784 "program": "test_generic.ts" 4785 }, 4786 "end": { 4787 "line": 53, 4788 "column": 59, 4789 "program": "test_generic.ts" 4790 } 4791 } 4792 }, 4793 "loc": { 4794 "start": { 4795 "line": 53, 4796 "column": 59, 4797 "program": "test_generic.ts" 4798 }, 4799 "end": { 4800 "line": 53, 4801 "column": 59, 4802 "program": "test_generic.ts" 4803 } 4804 } 4805 } 4806 ], 4807 "optional": false, 4808 "loc": { 4809 "start": { 4810 "line": 53, 4811 "column": 59, 4812 "program": "test_generic.ts" 4813 }, 4814 "end": { 4815 "line": 53, 4816 "column": 59, 4817 "program": "test_generic.ts" 4818 } 4819 } 4820 }, 4821 "loc": { 4822 "start": { 4823 "line": 53, 4824 "column": 59, 4825 "program": "test_generic.ts" 4826 }, 4827 "end": { 4828 "line": 53, 4829 "column": 59, 4830 "program": "test_generic.ts" 4831 } 4832 } 4833 } 4834 ], 4835 "loc": { 4836 "start": { 4837 "line": 53, 4838 "column": 59, 4839 "program": "test_generic.ts" 4840 }, 4841 "end": { 4842 "line": 53, 4843 "column": 59, 4844 "program": "test_generic.ts" 4845 } 4846 } 4847 }, 4848 "loc": { 4849 "start": { 4850 "line": 53, 4851 "column": 59, 4852 "program": "test_generic.ts" 4853 }, 4854 "end": { 4855 "line": 53, 4856 "column": 59, 4857 "program": "test_generic.ts" 4858 } 4859 } 4860 }, 4861 "loc": { 4862 "start": { 4863 "line": 53, 4864 "column": 59, 4865 "program": "test_generic.ts" 4866 }, 4867 "end": { 4868 "line": 53, 4869 "column": 59, 4870 "program": "test_generic.ts" 4871 } 4872 } 4873 }, 4874 "overloads": [], 4875 "decorators": [], 4876 "loc": { 4877 "start": { 4878 "line": 1, 4879 "column": 1, 4880 "program": null 4881 }, 4882 "end": { 4883 "line": 1, 4884 "column": 1, 4885 "program": null 4886 } 4887 } 4888 }, 4889 "body": [], 4890 "loc": { 4891 "start": { 4892 "line": 53, 4893 "column": 58, 4894 "program": "test_generic.ts" 4895 }, 4896 "end": { 4897 "line": 57, 4898 "column": 6, 4899 "program": "test_generic.ts" 4900 } 4901 } 4902 }, 4903 "loc": { 4904 "start": { 4905 "line": 53, 4906 "column": 1, 4907 "program": "test_generic.ts" 4908 }, 4909 "end": { 4910 "line": 57, 4911 "column": 6, 4912 "program": "test_generic.ts" 4913 } 4914 } 4915 }, 4916 { 4917 "type": "ClassDeclaration", 4918 "definition": { 4919 "id": { 4920 "type": "Identifier", 4921 "name": "X", 4922 "decorators": [], 4923 "loc": { 4924 "start": { 4925 "line": 57, 4926 "column": 7, 4927 "program": "test_generic.ts" 4928 }, 4929 "end": { 4930 "line": 57, 4931 "column": 8, 4932 "program": "test_generic.ts" 4933 } 4934 } 4935 }, 4936 "superClass": { 4937 "type": "Identifier", 4938 "name": "Q", 4939 "decorators": [], 4940 "loc": { 4941 "start": { 4942 "line": 57, 4943 "column": 17, 4944 "program": "test_generic.ts" 4945 }, 4946 "end": { 4947 "line": 57, 4948 "column": 18, 4949 "program": "test_generic.ts" 4950 } 4951 } 4952 }, 4953 "superTypeParameters": { 4954 "type": "TSTypeParameterInstantiation", 4955 "params": [ 4956 { 4957 "type": "TSNumberKeyword", 4958 "loc": { 4959 "start": { 4960 "line": 57, 4961 "column": 19, 4962 "program": "test_generic.ts" 4963 }, 4964 "end": { 4965 "line": 57, 4966 "column": 25, 4967 "program": "test_generic.ts" 4968 } 4969 } 4970 } 4971 ], 4972 "loc": { 4973 "start": { 4974 "line": 57, 4975 "column": 18, 4976 "program": "test_generic.ts" 4977 }, 4978 "end": { 4979 "line": 57, 4980 "column": 26, 4981 "program": "test_generic.ts" 4982 } 4983 } 4984 }, 4985 "implements": [ 4986 { 4987 "type": "TSClassImplements", 4988 "expression": { 4989 "type": "Identifier", 4990 "name": "S", 4991 "decorators": [], 4992 "loc": { 4993 "start": { 4994 "line": 57, 4995 "column": 38, 4996 "program": "test_generic.ts" 4997 }, 4998 "end": { 4999 "line": 57, 5000 "column": 39, 5001 "program": "test_generic.ts" 5002 } 5003 } 5004 }, 5005 "typeParameters": { 5006 "type": "TSTypeParameterInstantiation", 5007 "params": [ 5008 { 5009 "type": "TSFunctionType", 5010 "params": [ 5011 { 5012 "type": "Identifier", 5013 "name": "a", 5014 "typeAnnotation": { 5015 "type": "TSNumberKeyword", 5016 "loc": { 5017 "start": { 5018 "line": 57, 5019 "column": 46, 5020 "program": "test_generic.ts" 5021 }, 5022 "end": { 5023 "line": 57, 5024 "column": 52, 5025 "program": "test_generic.ts" 5026 } 5027 } 5028 }, 5029 "decorators": [], 5030 "loc": { 5031 "start": { 5032 "line": 57, 5033 "column": 44, 5034 "program": "test_generic.ts" 5035 }, 5036 "end": { 5037 "line": 57, 5038 "column": 45, 5039 "program": "test_generic.ts" 5040 } 5041 } 5042 }, 5043 { 5044 "type": "Identifier", 5045 "name": "b", 5046 "typeAnnotation": { 5047 "type": "TSStringKeyword", 5048 "loc": { 5049 "start": { 5050 "line": 57, 5051 "column": 56, 5052 "program": "test_generic.ts" 5053 }, 5054 "end": { 5055 "line": 57, 5056 "column": 62, 5057 "program": "test_generic.ts" 5058 } 5059 } 5060 }, 5061 "decorators": [], 5062 "loc": { 5063 "start": { 5064 "line": 57, 5065 "column": 54, 5066 "program": "test_generic.ts" 5067 }, 5068 "end": { 5069 "line": 57, 5070 "column": 55, 5071 "program": "test_generic.ts" 5072 } 5073 } 5074 } 5075 ], 5076 "typeParameters": { 5077 "type": "TSTypeParameterDeclaration", 5078 "params": [ 5079 { 5080 "type": "TSTypeParameter", 5081 "name": { 5082 "type": "Identifier", 5083 "name": "R", 5084 "decorators": [], 5085 "loc": { 5086 "start": { 5087 "line": 57, 5088 "column": 41, 5089 "program": "test_generic.ts" 5090 }, 5091 "end": { 5092 "line": 57, 5093 "column": 42, 5094 "program": "test_generic.ts" 5095 } 5096 } 5097 }, 5098 "loc": { 5099 "start": { 5100 "line": 57, 5101 "column": 41, 5102 "program": "test_generic.ts" 5103 }, 5104 "end": { 5105 "line": 57, 5106 "column": 43, 5107 "program": "test_generic.ts" 5108 } 5109 } 5110 } 5111 ], 5112 "loc": { 5113 "start": { 5114 "line": 57, 5115 "column": 40, 5116 "program": "test_generic.ts" 5117 }, 5118 "end": { 5119 "line": 57, 5120 "column": 43, 5121 "program": "test_generic.ts" 5122 } 5123 } 5124 }, 5125 "returnType": { 5126 "type": "TSTupleType", 5127 "elementTypes": [ 5128 { 5129 "type": "TSNumberKeyword", 5130 "loc": { 5131 "start": { 5132 "line": 57, 5133 "column": 68, 5134 "program": "test_generic.ts" 5135 }, 5136 "end": { 5137 "line": 57, 5138 "column": 75, 5139 "program": "test_generic.ts" 5140 } 5141 } 5142 } 5143 ], 5144 "loc": { 5145 "start": { 5146 "line": 57, 5147 "column": 67, 5148 "program": "test_generic.ts" 5149 }, 5150 "end": { 5151 "line": 57, 5152 "column": 75, 5153 "program": "test_generic.ts" 5154 } 5155 } 5156 }, 5157 "loc": { 5158 "start": { 5159 "line": 57, 5160 "column": 40, 5161 "program": "test_generic.ts" 5162 }, 5163 "end": { 5164 "line": 57, 5165 "column": 75, 5166 "program": "test_generic.ts" 5167 } 5168 } 5169 } 5170 ], 5171 "loc": { 5172 "start": { 5173 "line": 57, 5174 "column": 39, 5175 "program": "test_generic.ts" 5176 }, 5177 "end": { 5178 "line": 57, 5179 "column": 76, 5180 "program": "test_generic.ts" 5181 } 5182 } 5183 }, 5184 "loc": { 5185 "start": { 5186 "line": 57, 5187 "column": 38, 5188 "program": "test_generic.ts" 5189 }, 5190 "end": { 5191 "line": 57, 5192 "column": 77, 5193 "program": "test_generic.ts" 5194 } 5195 } 5196 }, 5197 { 5198 "type": "TSClassImplements", 5199 "expression": { 5200 "type": "Identifier", 5201 "name": "A", 5202 "decorators": [], 5203 "loc": { 5204 "start": { 5205 "line": 57, 5206 "column": 78, 5207 "program": "test_generic.ts" 5208 }, 5209 "end": { 5210 "line": 57, 5211 "column": 79, 5212 "program": "test_generic.ts" 5213 } 5214 } 5215 }, 5216 "loc": { 5217 "start": { 5218 "line": 57, 5219 "column": 78, 5220 "program": "test_generic.ts" 5221 }, 5222 "end": { 5223 "line": 57, 5224 "column": 81, 5225 "program": "test_generic.ts" 5226 } 5227 } 5228 } 5229 ], 5230 "constructor": { 5231 "type": "MethodDefinition", 5232 "key": { 5233 "type": "Identifier", 5234 "name": "constructor", 5235 "decorators": [], 5236 "loc": { 5237 "start": { 5238 "line": 57, 5239 "column": 81, 5240 "program": "test_generic.ts" 5241 }, 5242 "end": { 5243 "line": 57, 5244 "column": 81, 5245 "program": "test_generic.ts" 5246 } 5247 } 5248 }, 5249 "kind": "constructor", 5250 "static": false, 5251 "optional": false, 5252 "computed": false, 5253 "value": { 5254 "type": "FunctionExpression", 5255 "function": { 5256 "type": "ScriptFunction", 5257 "id": null, 5258 "generator": false, 5259 "async": false, 5260 "expression": false, 5261 "params": [ 5262 { 5263 "type": "RestElement", 5264 "argument": { 5265 "type": "Identifier", 5266 "name": "args", 5267 "decorators": [], 5268 "loc": { 5269 "start": { 5270 "line": 57, 5271 "column": 81, 5272 "program": "test_generic.ts" 5273 }, 5274 "end": { 5275 "line": 57, 5276 "column": 81, 5277 "program": "test_generic.ts" 5278 } 5279 } 5280 }, 5281 "loc": { 5282 "start": { 5283 "line": 57, 5284 "column": 81, 5285 "program": "test_generic.ts" 5286 }, 5287 "end": { 5288 "line": 57, 5289 "column": 81, 5290 "program": "test_generic.ts" 5291 } 5292 } 5293 } 5294 ], 5295 "body": { 5296 "type": "BlockStatement", 5297 "statements": [ 5298 { 5299 "type": "ExpressionStatement", 5300 "expression": { 5301 "type": "CallExpression", 5302 "callee": { 5303 "type": "Super", 5304 "loc": { 5305 "start": { 5306 "line": 57, 5307 "column": 81, 5308 "program": "test_generic.ts" 5309 }, 5310 "end": { 5311 "line": 57, 5312 "column": 81, 5313 "program": "test_generic.ts" 5314 } 5315 } 5316 }, 5317 "arguments": [ 5318 { 5319 "type": "SpreadElement", 5320 "argument": { 5321 "type": "Identifier", 5322 "name": "args", 5323 "decorators": [], 5324 "loc": { 5325 "start": { 5326 "line": 57, 5327 "column": 81, 5328 "program": "test_generic.ts" 5329 }, 5330 "end": { 5331 "line": 57, 5332 "column": 81, 5333 "program": "test_generic.ts" 5334 } 5335 } 5336 }, 5337 "loc": { 5338 "start": { 5339 "line": 57, 5340 "column": 81, 5341 "program": "test_generic.ts" 5342 }, 5343 "end": { 5344 "line": 57, 5345 "column": 81, 5346 "program": "test_generic.ts" 5347 } 5348 } 5349 } 5350 ], 5351 "optional": false, 5352 "loc": { 5353 "start": { 5354 "line": 57, 5355 "column": 81, 5356 "program": "test_generic.ts" 5357 }, 5358 "end": { 5359 "line": 57, 5360 "column": 81, 5361 "program": "test_generic.ts" 5362 } 5363 } 5364 }, 5365 "loc": { 5366 "start": { 5367 "line": 57, 5368 "column": 81, 5369 "program": "test_generic.ts" 5370 }, 5371 "end": { 5372 "line": 57, 5373 "column": 81, 5374 "program": "test_generic.ts" 5375 } 5376 } 5377 } 5378 ], 5379 "loc": { 5380 "start": { 5381 "line": 57, 5382 "column": 81, 5383 "program": "test_generic.ts" 5384 }, 5385 "end": { 5386 "line": 57, 5387 "column": 81, 5388 "program": "test_generic.ts" 5389 } 5390 } 5391 }, 5392 "loc": { 5393 "start": { 5394 "line": 57, 5395 "column": 81, 5396 "program": "test_generic.ts" 5397 }, 5398 "end": { 5399 "line": 57, 5400 "column": 81, 5401 "program": "test_generic.ts" 5402 } 5403 } 5404 }, 5405 "loc": { 5406 "start": { 5407 "line": 57, 5408 "column": 81, 5409 "program": "test_generic.ts" 5410 }, 5411 "end": { 5412 "line": 57, 5413 "column": 81, 5414 "program": "test_generic.ts" 5415 } 5416 } 5417 }, 5418 "overloads": [], 5419 "decorators": [], 5420 "loc": { 5421 "start": { 5422 "line": 1, 5423 "column": 1, 5424 "program": null 5425 }, 5426 "end": { 5427 "line": 1, 5428 "column": 1, 5429 "program": null 5430 } 5431 } 5432 }, 5433 "body": [], 5434 "loc": { 5435 "start": { 5436 "line": 57, 5437 "column": 80, 5438 "program": "test_generic.ts" 5439 }, 5440 "end": { 5441 "line": 61, 5442 "column": 4, 5443 "program": "test_generic.ts" 5444 } 5445 } 5446 }, 5447 "loc": { 5448 "start": { 5449 "line": 57, 5450 "column": 1, 5451 "program": "test_generic.ts" 5452 }, 5453 "end": { 5454 "line": 61, 5455 "column": 4, 5456 "program": "test_generic.ts" 5457 } 5458 } 5459 }, 5460 { 5461 "type": "VariableDeclaration", 5462 "declarations": [ 5463 { 5464 "type": "VariableDeclarator", 5465 "id": { 5466 "type": "Identifier", 5467 "name": "a", 5468 "typeAnnotation": { 5469 "type": "TSConstructorType", 5470 "params": [], 5471 "typeParameters": { 5472 "type": "TSTypeParameterDeclaration", 5473 "params": [ 5474 { 5475 "type": "TSTypeParameter", 5476 "name": { 5477 "type": "Identifier", 5478 "name": "A", 5479 "decorators": [], 5480 "loc": { 5481 "start": { 5482 "line": 61, 5483 "column": 13, 5484 "program": "test_generic.ts" 5485 }, 5486 "end": { 5487 "line": 61, 5488 "column": 14, 5489 "program": "test_generic.ts" 5490 } 5491 } 5492 }, 5493 "loc": { 5494 "start": { 5495 "line": 61, 5496 "column": 13, 5497 "program": "test_generic.ts" 5498 }, 5499 "end": { 5500 "line": 61, 5501 "column": 15, 5502 "program": "test_generic.ts" 5503 } 5504 } 5505 } 5506 ], 5507 "loc": { 5508 "start": { 5509 "line": 61, 5510 "column": 12, 5511 "program": "test_generic.ts" 5512 }, 5513 "end": { 5514 "line": 61, 5515 "column": 15, 5516 "program": "test_generic.ts" 5517 } 5518 } 5519 }, 5520 "returnType": { 5521 "type": "TSFunctionType", 5522 "params": [], 5523 "typeParameters": { 5524 "type": "TSTypeParameterDeclaration", 5525 "params": [ 5526 { 5527 "type": "TSTypeParameter", 5528 "name": { 5529 "type": "Identifier", 5530 "name": "B", 5531 "decorators": [], 5532 "loc": { 5533 "start": { 5534 "line": 61, 5535 "column": 22, 5536 "program": "test_generic.ts" 5537 }, 5538 "end": { 5539 "line": 61, 5540 "column": 23, 5541 "program": "test_generic.ts" 5542 } 5543 } 5544 }, 5545 "loc": { 5546 "start": { 5547 "line": 61, 5548 "column": 22, 5549 "program": "test_generic.ts" 5550 }, 5551 "end": { 5552 "line": 61, 5553 "column": 24, 5554 "program": "test_generic.ts" 5555 } 5556 } 5557 } 5558 ], 5559 "loc": { 5560 "start": { 5561 "line": 61, 5562 "column": 21, 5563 "program": "test_generic.ts" 5564 }, 5565 "end": { 5566 "line": 61, 5567 "column": 24, 5568 "program": "test_generic.ts" 5569 } 5570 } 5571 }, 5572 "returnType": { 5573 "type": "TSStringKeyword", 5574 "loc": { 5575 "start": { 5576 "line": 61, 5577 "column": 30, 5578 "program": "test_generic.ts" 5579 }, 5580 "end": { 5581 "line": 61, 5582 "column": 36, 5583 "program": "test_generic.ts" 5584 } 5585 } 5586 }, 5587 "loc": { 5588 "start": { 5589 "line": 61, 5590 "column": 21, 5591 "program": "test_generic.ts" 5592 }, 5593 "end": { 5594 "line": 61, 5595 "column": 36, 5596 "program": "test_generic.ts" 5597 } 5598 } 5599 }, 5600 "loc": { 5601 "start": { 5602 "line": 61, 5603 "column": 8, 5604 "program": "test_generic.ts" 5605 }, 5606 "end": { 5607 "line": 61, 5608 "column": 36, 5609 "program": "test_generic.ts" 5610 } 5611 } 5612 }, 5613 "decorators": [], 5614 "loc": { 5615 "start": { 5616 "line": 61, 5617 "column": 5, 5618 "program": "test_generic.ts" 5619 }, 5620 "end": { 5621 "line": 61, 5622 "column": 6, 5623 "program": "test_generic.ts" 5624 } 5625 } 5626 }, 5627 "init": null, 5628 "loc": { 5629 "start": { 5630 "line": 61, 5631 "column": 5, 5632 "program": "test_generic.ts" 5633 }, 5634 "end": { 5635 "line": 61, 5636 "column": 6, 5637 "program": "test_generic.ts" 5638 } 5639 } 5640 } 5641 ], 5642 "kind": "var", 5643 "loc": { 5644 "start": { 5645 "line": 61, 5646 "column": 1, 5647 "program": "test_generic.ts" 5648 }, 5649 "end": { 5650 "line": 61, 5651 "column": 37, 5652 "program": "test_generic.ts" 5653 } 5654 } 5655 }, 5656 { 5657 "type": "VariableDeclaration", 5658 "declarations": [ 5659 { 5660 "type": "VariableDeclarator", 5661 "id": { 5662 "type": "Identifier", 5663 "name": "b", 5664 "typeAnnotation": { 5665 "type": "TSFunctionType", 5666 "params": [ 5667 { 5668 "type": "Identifier", 5669 "name": "a", 5670 "typeAnnotation": { 5671 "type": "TSUnionType", 5672 "types": [ 5673 { 5674 "type": "TSNumberKeyword", 5675 "loc": { 5676 "start": { 5677 "line": 62, 5678 "column": 32, 5679 "program": "test_generic.ts" 5680 }, 5681 "end": { 5682 "line": 62, 5683 "column": 38, 5684 "program": "test_generic.ts" 5685 } 5686 } 5687 }, 5688 { 5689 "type": "TSStringKeyword", 5690 "loc": { 5691 "start": { 5692 "line": 62, 5693 "column": 41, 5694 "program": "test_generic.ts" 5695 }, 5696 "end": { 5697 "line": 62, 5698 "column": 47, 5699 "program": "test_generic.ts" 5700 } 5701 } 5702 } 5703 ], 5704 "loc": { 5705 "start": { 5706 "line": 62, 5707 "column": 32, 5708 "program": "test_generic.ts" 5709 }, 5710 "end": { 5711 "line": 62, 5712 "column": 47, 5713 "program": "test_generic.ts" 5714 } 5715 } 5716 }, 5717 "decorators": [], 5718 "loc": { 5719 "start": { 5720 "line": 62, 5721 "column": 29, 5722 "program": "test_generic.ts" 5723 }, 5724 "end": { 5725 "line": 62, 5726 "column": 30, 5727 "program": "test_generic.ts" 5728 } 5729 } 5730 } 5731 ], 5732 "typeParameters": { 5733 "type": "TSTypeParameterDeclaration", 5734 "params": [ 5735 { 5736 "type": "TSTypeParameter", 5737 "name": { 5738 "type": "Identifier", 5739 "name": "A", 5740 "decorators": [], 5741 "loc": { 5742 "start": { 5743 "line": 62, 5744 "column": 9, 5745 "program": "test_generic.ts" 5746 }, 5747 "end": { 5748 "line": 62, 5749 "column": 10, 5750 "program": "test_generic.ts" 5751 } 5752 } 5753 }, 5754 "constraint": { 5755 "type": "TSTypeReference", 5756 "typeName": { 5757 "type": "Identifier", 5758 "name": "T", 5759 "decorators": [], 5760 "loc": { 5761 "start": { 5762 "line": 62, 5763 "column": 19, 5764 "program": "test_generic.ts" 5765 }, 5766 "end": { 5767 "line": 62, 5768 "column": 20, 5769 "program": "test_generic.ts" 5770 } 5771 } 5772 }, 5773 "loc": { 5774 "start": { 5775 "line": 62, 5776 "column": 19, 5777 "program": "test_generic.ts" 5778 }, 5779 "end": { 5780 "line": 62, 5781 "column": 20, 5782 "program": "test_generic.ts" 5783 } 5784 } 5785 }, 5786 "loc": { 5787 "start": { 5788 "line": 62, 5789 "column": 9, 5790 "program": "test_generic.ts" 5791 }, 5792 "end": { 5793 "line": 62, 5794 "column": 21, 5795 "program": "test_generic.ts" 5796 } 5797 } 5798 }, 5799 { 5800 "type": "TSTypeParameter", 5801 "name": { 5802 "type": "Identifier", 5803 "name": "U", 5804 "decorators": [], 5805 "loc": { 5806 "start": { 5807 "line": 62, 5808 "column": 22, 5809 "program": "test_generic.ts" 5810 }, 5811 "end": { 5812 "line": 62, 5813 "column": 23, 5814 "program": "test_generic.ts" 5815 } 5816 } 5817 }, 5818 "default": { 5819 "type": "TSLiteralType", 5820 "literal": { 5821 "type": "NumberLiteral", 5822 "value": 5, 5823 "loc": { 5824 "start": { 5825 "line": 62, 5826 "column": 26, 5827 "program": "test_generic.ts" 5828 }, 5829 "end": { 5830 "line": 62, 5831 "column": 27, 5832 "program": "test_generic.ts" 5833 } 5834 } 5835 }, 5836 "loc": { 5837 "start": { 5838 "line": 62, 5839 "column": 26, 5840 "program": "test_generic.ts" 5841 }, 5842 "end": { 5843 "line": 62, 5844 "column": 27, 5845 "program": "test_generic.ts" 5846 } 5847 } 5848 }, 5849 "loc": { 5850 "start": { 5851 "line": 62, 5852 "column": 22, 5853 "program": "test_generic.ts" 5854 }, 5855 "end": { 5856 "line": 62, 5857 "column": 28, 5858 "program": "test_generic.ts" 5859 } 5860 } 5861 } 5862 ], 5863 "loc": { 5864 "start": { 5865 "line": 62, 5866 "column": 8, 5867 "program": "test_generic.ts" 5868 }, 5869 "end": { 5870 "line": 62, 5871 "column": 28, 5872 "program": "test_generic.ts" 5873 } 5874 } 5875 }, 5876 "returnType": { 5877 "type": "TSTypeLiteral", 5878 "members": [ 5879 { 5880 "type": "TSPropertySignature", 5881 "computed": false, 5882 "optional": false, 5883 "readonly": false, 5884 "key": { 5885 "type": "Identifier", 5886 "name": "a", 5887 "decorators": [], 5888 "loc": { 5889 "start": { 5890 "line": 62, 5891 "column": 54, 5892 "program": "test_generic.ts" 5893 }, 5894 "end": { 5895 "line": 62, 5896 "column": 55, 5897 "program": "test_generic.ts" 5898 } 5899 } 5900 }, 5901 "typeAnnotation": { 5902 "type": "TSNumberKeyword", 5903 "loc": { 5904 "start": { 5905 "line": 62, 5906 "column": 57, 5907 "program": "test_generic.ts" 5908 }, 5909 "end": { 5910 "line": 62, 5911 "column": 63, 5912 "program": "test_generic.ts" 5913 } 5914 } 5915 }, 5916 "loc": { 5917 "start": { 5918 "line": 62, 5919 "column": 54, 5920 "program": "test_generic.ts" 5921 }, 5922 "end": { 5923 "line": 62, 5924 "column": 65, 5925 "program": "test_generic.ts" 5926 } 5927 } 5928 } 5929 ], 5930 "loc": { 5931 "start": { 5932 "line": 62, 5933 "column": 52, 5934 "program": "test_generic.ts" 5935 }, 5936 "end": { 5937 "line": 62, 5938 "column": 65, 5939 "program": "test_generic.ts" 5940 } 5941 } 5942 }, 5943 "loc": { 5944 "start": { 5945 "line": 62, 5946 "column": 8, 5947 "program": "test_generic.ts" 5948 }, 5949 "end": { 5950 "line": 62, 5951 "column": 65, 5952 "program": "test_generic.ts" 5953 } 5954 } 5955 }, 5956 "decorators": [], 5957 "loc": { 5958 "start": { 5959 "line": 62, 5960 "column": 5, 5961 "program": "test_generic.ts" 5962 }, 5963 "end": { 5964 "line": 62, 5965 "column": 6, 5966 "program": "test_generic.ts" 5967 } 5968 } 5969 }, 5970 "init": null, 5971 "loc": { 5972 "start": { 5973 "line": 62, 5974 "column": 5, 5975 "program": "test_generic.ts" 5976 }, 5977 "end": { 5978 "line": 62, 5979 "column": 6, 5980 "program": "test_generic.ts" 5981 } 5982 } 5983 } 5984 ], 5985 "kind": "var", 5986 "loc": { 5987 "start": { 5988 "line": 62, 5989 "column": 1, 5990 "program": "test_generic.ts" 5991 }, 5992 "end": { 5993 "line": 62, 5994 "column": 66, 5995 "program": "test_generic.ts" 5996 } 5997 } 5998 }, 5999 { 6000 "type": "VariableDeclaration", 6001 "declarations": [ 6002 { 6003 "type": "VariableDeclarator", 6004 "id": { 6005 "type": "Identifier", 6006 "name": "c", 6007 "typeAnnotation": { 6008 "type": "TSIndexedAccessType", 6009 "objectType": { 6010 "type": "TSTypeReference", 6011 "typeName": { 6012 "type": "TSQualifiedName", 6013 "left": { 6014 "type": "Identifier", 6015 "name": "B", 6016 "decorators": [], 6017 "loc": { 6018 "start": { 6019 "line": 64, 6020 "column": 8, 6021 "program": "test_generic.ts" 6022 }, 6023 "end": { 6024 "line": 64, 6025 "column": 9, 6026 "program": "test_generic.ts" 6027 } 6028 } 6029 }, 6030 "right": { 6031 "type": "Identifier", 6032 "name": "T", 6033 "decorators": [], 6034 "loc": { 6035 "start": { 6036 "line": 64, 6037 "column": 10, 6038 "program": "test_generic.ts" 6039 }, 6040 "end": { 6041 "line": 64, 6042 "column": 11, 6043 "program": "test_generic.ts" 6044 } 6045 } 6046 }, 6047 "loc": { 6048 "start": { 6049 "line": 64, 6050 "column": 8, 6051 "program": "test_generic.ts" 6052 }, 6053 "end": { 6054 "line": 64, 6055 "column": 12, 6056 "program": "test_generic.ts" 6057 } 6058 } 6059 }, 6060 "typeParameters": { 6061 "type": "TSTypeParameterInstantiation", 6062 "params": [ 6063 { 6064 "type": "TSTypeReference", 6065 "typeName": { 6066 "type": "Identifier", 6067 "name": "A", 6068 "decorators": [], 6069 "loc": { 6070 "start": { 6071 "line": 64, 6072 "column": 12, 6073 "program": "test_generic.ts" 6074 }, 6075 "end": { 6076 "line": 64, 6077 "column": 13, 6078 "program": "test_generic.ts" 6079 } 6080 } 6081 }, 6082 "typeParameters": { 6083 "type": "TSTypeParameterInstantiation", 6084 "params": [ 6085 { 6086 "type": "TSTypeReference", 6087 "typeName": { 6088 "type": "Identifier", 6089 "name": "C", 6090 "decorators": [], 6091 "loc": { 6092 "start": { 6093 "line": 64, 6094 "column": 14, 6095 "program": "test_generic.ts" 6096 }, 6097 "end": { 6098 "line": 64, 6099 "column": 15, 6100 "program": "test_generic.ts" 6101 } 6102 } 6103 }, 6104 "typeParameters": { 6105 "type": "TSTypeParameterInstantiation", 6106 "params": [ 6107 { 6108 "type": "TSNumberKeyword", 6109 "loc": { 6110 "start": { 6111 "line": 64, 6112 "column": 16, 6113 "program": "test_generic.ts" 6114 }, 6115 "end": { 6116 "line": 64, 6117 "column": 22, 6118 "program": "test_generic.ts" 6119 } 6120 } 6121 } 6122 ], 6123 "loc": { 6124 "start": { 6125 "line": 64, 6126 "column": 14, 6127 "program": "test_generic.ts" 6128 }, 6129 "end": { 6130 "line": 64, 6131 "column": 25, 6132 "program": "test_generic.ts" 6133 } 6134 } 6135 }, 6136 "loc": { 6137 "start": { 6138 "line": 64, 6139 "column": 14, 6140 "program": "test_generic.ts" 6141 }, 6142 "end": { 6143 "line": 64, 6144 "column": 15, 6145 "program": "test_generic.ts" 6146 } 6147 } 6148 } 6149 ], 6150 "loc": { 6151 "start": { 6152 "line": 64, 6153 "column": 12, 6154 "program": "test_generic.ts" 6155 }, 6156 "end": { 6157 "line": 64, 6158 "column": 25, 6159 "program": "test_generic.ts" 6160 } 6161 } 6162 }, 6163 "loc": { 6164 "start": { 6165 "line": 64, 6166 "column": 12, 6167 "program": "test_generic.ts" 6168 }, 6169 "end": { 6170 "line": 64, 6171 "column": 13, 6172 "program": "test_generic.ts" 6173 } 6174 } 6175 } 6176 ], 6177 "loc": { 6178 "start": { 6179 "line": 64, 6180 "column": 11, 6181 "program": "test_generic.ts" 6182 }, 6183 "end": { 6184 "line": 64, 6185 "column": 25, 6186 "program": "test_generic.ts" 6187 } 6188 } 6189 }, 6190 "loc": { 6191 "start": { 6192 "line": 64, 6193 "column": 8, 6194 "program": "test_generic.ts" 6195 }, 6196 "end": { 6197 "line": 64, 6198 "column": 26, 6199 "program": "test_generic.ts" 6200 } 6201 } 6202 }, 6203 "indexType": { 6204 "type": "TSLiteralType", 6205 "literal": { 6206 "type": "NumberLiteral", 6207 "value": 0, 6208 "loc": { 6209 "start": { 6210 "line": 64, 6211 "column": 26, 6212 "program": "test_generic.ts" 6213 }, 6214 "end": { 6215 "line": 64, 6216 "column": 27, 6217 "program": "test_generic.ts" 6218 } 6219 } 6220 }, 6221 "loc": { 6222 "start": { 6223 "line": 64, 6224 "column": 26, 6225 "program": "test_generic.ts" 6226 }, 6227 "end": { 6228 "line": 64, 6229 "column": 27, 6230 "program": "test_generic.ts" 6231 } 6232 } 6233 }, 6234 "loc": { 6235 "start": { 6236 "line": 64, 6237 "column": 8, 6238 "program": "test_generic.ts" 6239 }, 6240 "end": { 6241 "line": 64, 6242 "column": 29, 6243 "program": "test_generic.ts" 6244 } 6245 } 6246 }, 6247 "decorators": [], 6248 "loc": { 6249 "start": { 6250 "line": 64, 6251 "column": 5, 6252 "program": "test_generic.ts" 6253 }, 6254 "end": { 6255 "line": 64, 6256 "column": 6, 6257 "program": "test_generic.ts" 6258 } 6259 } 6260 }, 6261 "init": null, 6262 "loc": { 6263 "start": { 6264 "line": 64, 6265 "column": 5, 6266 "program": "test_generic.ts" 6267 }, 6268 "end": { 6269 "line": 64, 6270 "column": 6, 6271 "program": "test_generic.ts" 6272 } 6273 } 6274 } 6275 ], 6276 "kind": "var", 6277 "loc": { 6278 "start": { 6279 "line": 64, 6280 "column": 1, 6281 "program": "test_generic.ts" 6282 }, 6283 "end": { 6284 "line": 64, 6285 "column": 29, 6286 "program": "test_generic.ts" 6287 } 6288 } 6289 }, 6290 { 6291 "type": "VariableDeclaration", 6292 "declarations": [ 6293 { 6294 "type": "VariableDeclarator", 6295 "id": { 6296 "type": "Identifier", 6297 "name": "d", 6298 "typeAnnotation": { 6299 "type": "TSTypeReference", 6300 "typeName": { 6301 "type": "Identifier", 6302 "name": "A", 6303 "decorators": [], 6304 "loc": { 6305 "start": { 6306 "line": 65, 6307 "column": 8, 6308 "program": "test_generic.ts" 6309 }, 6310 "end": { 6311 "line": 65, 6312 "column": 9, 6313 "program": "test_generic.ts" 6314 } 6315 } 6316 }, 6317 "typeParameters": { 6318 "type": "TSTypeParameterInstantiation", 6319 "params": [ 6320 { 6321 "type": "TSNumberKeyword", 6322 "loc": { 6323 "start": { 6324 "line": 65, 6325 "column": 10, 6326 "program": "test_generic.ts" 6327 }, 6328 "end": { 6329 "line": 65, 6330 "column": 16, 6331 "program": "test_generic.ts" 6332 } 6333 } 6334 }, 6335 { 6336 "type": "TSTypeLiteral", 6337 "members": [ 6338 { 6339 "type": "TSPropertySignature", 6340 "computed": false, 6341 "optional": false, 6342 "readonly": false, 6343 "key": { 6344 "type": "Identifier", 6345 "name": "a", 6346 "decorators": [], 6347 "loc": { 6348 "start": { 6349 "line": 65, 6350 "column": 20, 6351 "program": "test_generic.ts" 6352 }, 6353 "end": { 6354 "line": 65, 6355 "column": 21, 6356 "program": "test_generic.ts" 6357 } 6358 } 6359 }, 6360 "typeAnnotation": { 6361 "type": "TSNumberKeyword", 6362 "loc": { 6363 "start": { 6364 "line": 65, 6365 "column": 23, 6366 "program": "test_generic.ts" 6367 }, 6368 "end": { 6369 "line": 65, 6370 "column": 29, 6371 "program": "test_generic.ts" 6372 } 6373 } 6374 }, 6375 "loc": { 6376 "start": { 6377 "line": 65, 6378 "column": 20, 6379 "program": "test_generic.ts" 6380 }, 6381 "end": { 6382 "line": 65, 6383 "column": 30, 6384 "program": "test_generic.ts" 6385 } 6386 } 6387 }, 6388 { 6389 "type": "TSPropertySignature", 6390 "computed": false, 6391 "optional": false, 6392 "readonly": false, 6393 "key": { 6394 "type": "Identifier", 6395 "name": "b", 6396 "decorators": [], 6397 "loc": { 6398 "start": { 6399 "line": 65, 6400 "column": 31, 6401 "program": "test_generic.ts" 6402 }, 6403 "end": { 6404 "line": 65, 6405 "column": 32, 6406 "program": "test_generic.ts" 6407 } 6408 } 6409 }, 6410 "typeAnnotation": { 6411 "type": "TSStringKeyword", 6412 "loc": { 6413 "start": { 6414 "line": 65, 6415 "column": 34, 6416 "program": "test_generic.ts" 6417 }, 6418 "end": { 6419 "line": 65, 6420 "column": 40, 6421 "program": "test_generic.ts" 6422 } 6423 } 6424 }, 6425 "loc": { 6426 "start": { 6427 "line": 65, 6428 "column": 31, 6429 "program": "test_generic.ts" 6430 }, 6431 "end": { 6432 "line": 65, 6433 "column": 42, 6434 "program": "test_generic.ts" 6435 } 6436 } 6437 } 6438 ], 6439 "loc": { 6440 "start": { 6441 "line": 65, 6442 "column": 18, 6443 "program": "test_generic.ts" 6444 }, 6445 "end": { 6446 "line": 65, 6447 "column": 42, 6448 "program": "test_generic.ts" 6449 } 6450 } 6451 }, 6452 { 6453 "type": "TSTupleType", 6454 "elementTypes": [ 6455 { 6456 "type": "TSNumberKeyword", 6457 "loc": { 6458 "start": { 6459 "line": 65, 6460 "column": 45, 6461 "program": "test_generic.ts" 6462 }, 6463 "end": { 6464 "line": 65, 6465 "column": 52, 6466 "program": "test_generic.ts" 6467 } 6468 } 6469 }, 6470 { 6471 "type": "TSStringKeyword", 6472 "loc": { 6473 "start": { 6474 "line": 65, 6475 "column": 53, 6476 "program": "test_generic.ts" 6477 }, 6478 "end": { 6479 "line": 65, 6480 "column": 60, 6481 "program": "test_generic.ts" 6482 } 6483 } 6484 } 6485 ], 6486 "loc": { 6487 "start": { 6488 "line": 65, 6489 "column": 44, 6490 "program": "test_generic.ts" 6491 }, 6492 "end": { 6493 "line": 65, 6494 "column": 60, 6495 "program": "test_generic.ts" 6496 } 6497 } 6498 } 6499 ], 6500 "loc": { 6501 "start": { 6502 "line": 65, 6503 "column": 8, 6504 "program": "test_generic.ts" 6505 }, 6506 "end": { 6507 "line": 65, 6508 "column": 61, 6509 "program": "test_generic.ts" 6510 } 6511 } 6512 }, 6513 "loc": { 6514 "start": { 6515 "line": 65, 6516 "column": 8, 6517 "program": "test_generic.ts" 6518 }, 6519 "end": { 6520 "line": 65, 6521 "column": 9, 6522 "program": "test_generic.ts" 6523 } 6524 } 6525 }, 6526 "decorators": [], 6527 "loc": { 6528 "start": { 6529 "line": 65, 6530 "column": 5, 6531 "program": "test_generic.ts" 6532 }, 6533 "end": { 6534 "line": 65, 6535 "column": 6, 6536 "program": "test_generic.ts" 6537 } 6538 } 6539 }, 6540 "init": null, 6541 "loc": { 6542 "start": { 6543 "line": 65, 6544 "column": 5, 6545 "program": "test_generic.ts" 6546 }, 6547 "end": { 6548 "line": 65, 6549 "column": 6, 6550 "program": "test_generic.ts" 6551 } 6552 } 6553 } 6554 ], 6555 "kind": "var", 6556 "loc": { 6557 "start": { 6558 "line": 65, 6559 "column": 1, 6560 "program": "test_generic.ts" 6561 }, 6562 "end": { 6563 "line": 65, 6564 "column": 62, 6565 "program": "test_generic.ts" 6566 } 6567 } 6568 }, 6569 { 6570 "type": "VariableDeclaration", 6571 "declarations": [ 6572 { 6573 "type": "VariableDeclarator", 6574 "id": { 6575 "type": "Identifier", 6576 "name": "e", 6577 "typeAnnotation": { 6578 "type": "TSTypeReference", 6579 "typeName": { 6580 "type": "Identifier", 6581 "name": "T", 6582 "decorators": [], 6583 "loc": { 6584 "start": { 6585 "line": 66, 6586 "column": 8, 6587 "program": "test_generic.ts" 6588 }, 6589 "end": { 6590 "line": 66, 6591 "column": 9, 6592 "program": "test_generic.ts" 6593 } 6594 } 6595 }, 6596 "typeParameters": { 6597 "type": "TSTypeParameterInstantiation", 6598 "params": [ 6599 { 6600 "type": "TSFunctionType", 6601 "params": [], 6602 "typeParameters": { 6603 "type": "TSTypeParameterDeclaration", 6604 "params": [ 6605 { 6606 "type": "TSTypeParameter", 6607 "name": { 6608 "type": "Identifier", 6609 "name": "A", 6610 "decorators": [], 6611 "loc": { 6612 "start": { 6613 "line": 66, 6614 "column": 11, 6615 "program": "test_generic.ts" 6616 }, 6617 "end": { 6618 "line": 66, 6619 "column": 12, 6620 "program": "test_generic.ts" 6621 } 6622 } 6623 }, 6624 "loc": { 6625 "start": { 6626 "line": 66, 6627 "column": 11, 6628 "program": "test_generic.ts" 6629 }, 6630 "end": { 6631 "line": 66, 6632 "column": 13, 6633 "program": "test_generic.ts" 6634 } 6635 } 6636 } 6637 ], 6638 "loc": { 6639 "start": { 6640 "line": 66, 6641 "column": 10, 6642 "program": "test_generic.ts" 6643 }, 6644 "end": { 6645 "line": 66, 6646 "column": 13, 6647 "program": "test_generic.ts" 6648 } 6649 } 6650 }, 6651 "returnType": { 6652 "type": "TSTypeLiteral", 6653 "members": [], 6654 "loc": { 6655 "start": { 6656 "line": 66, 6657 "column": 19, 6658 "program": "test_generic.ts" 6659 }, 6660 "end": { 6661 "line": 66, 6662 "column": 21, 6663 "program": "test_generic.ts" 6664 } 6665 } 6666 }, 6667 "loc": { 6668 "start": { 6669 "line": 66, 6670 "column": 10, 6671 "program": "test_generic.ts" 6672 }, 6673 "end": { 6674 "line": 66, 6675 "column": 21, 6676 "program": "test_generic.ts" 6677 } 6678 } 6679 } 6680 ], 6681 "loc": { 6682 "start": { 6683 "line": 66, 6684 "column": 8, 6685 "program": "test_generic.ts" 6686 }, 6687 "end": { 6688 "line": 66, 6689 "column": 22, 6690 "program": "test_generic.ts" 6691 } 6692 } 6693 }, 6694 "loc": { 6695 "start": { 6696 "line": 66, 6697 "column": 8, 6698 "program": "test_generic.ts" 6699 }, 6700 "end": { 6701 "line": 66, 6702 "column": 9, 6703 "program": "test_generic.ts" 6704 } 6705 } 6706 }, 6707 "decorators": [], 6708 "loc": { 6709 "start": { 6710 "line": 66, 6711 "column": 5, 6712 "program": "test_generic.ts" 6713 }, 6714 "end": { 6715 "line": 66, 6716 "column": 6, 6717 "program": "test_generic.ts" 6718 } 6719 } 6720 }, 6721 "init": null, 6722 "loc": { 6723 "start": { 6724 "line": 66, 6725 "column": 5, 6726 "program": "test_generic.ts" 6727 }, 6728 "end": { 6729 "line": 66, 6730 "column": 6, 6731 "program": "test_generic.ts" 6732 } 6733 } 6734 } 6735 ], 6736 "kind": "var", 6737 "loc": { 6738 "start": { 6739 "line": 66, 6740 "column": 1, 6741 "program": "test_generic.ts" 6742 }, 6743 "end": { 6744 "line": 66, 6745 "column": 23, 6746 "program": "test_generic.ts" 6747 } 6748 } 6749 }, 6750 { 6751 "type": "TSTypeAliasDeclaration", 6752 "id": { 6753 "type": "Identifier", 6754 "name": "E", 6755 "decorators": [], 6756 "loc": { 6757 "start": { 6758 "line": 68, 6759 "column": 6, 6760 "program": "test_generic.ts" 6761 }, 6762 "end": { 6763 "line": 68, 6764 "column": 7, 6765 "program": "test_generic.ts" 6766 } 6767 } 6768 }, 6769 "typeAnnotation": { 6770 "type": "TSUnionType", 6771 "types": [ 6772 { 6773 "type": "TSNumberKeyword", 6774 "loc": { 6775 "start": { 6776 "line": 68, 6777 "column": 38, 6778 "program": "test_generic.ts" 6779 }, 6780 "end": { 6781 "line": 68, 6782 "column": 44, 6783 "program": "test_generic.ts" 6784 } 6785 } 6786 }, 6787 { 6788 "type": "TSTypeReference", 6789 "typeName": { 6790 "type": "Identifier", 6791 "name": "T", 6792 "decorators": [], 6793 "loc": { 6794 "start": { 6795 "line": 68, 6796 "column": 47, 6797 "program": "test_generic.ts" 6798 }, 6799 "end": { 6800 "line": 68, 6801 "column": 48, 6802 "program": "test_generic.ts" 6803 } 6804 } 6805 }, 6806 "loc": { 6807 "start": { 6808 "line": 68, 6809 "column": 47, 6810 "program": "test_generic.ts" 6811 }, 6812 "end": { 6813 "line": 68, 6814 "column": 48, 6815 "program": "test_generic.ts" 6816 } 6817 } 6818 }, 6819 { 6820 "type": "TSStringKeyword", 6821 "loc": { 6822 "start": { 6823 "line": 68, 6824 "column": 51, 6825 "program": "test_generic.ts" 6826 }, 6827 "end": { 6828 "line": 68, 6829 "column": 57, 6830 "program": "test_generic.ts" 6831 } 6832 } 6833 } 6834 ], 6835 "loc": { 6836 "start": { 6837 "line": 68, 6838 "column": 38, 6839 "program": "test_generic.ts" 6840 }, 6841 "end": { 6842 "line": 68, 6843 "column": 57, 6844 "program": "test_generic.ts" 6845 } 6846 } 6847 }, 6848 "typeParameters": { 6849 "type": "TSTypeParameterDeclaration", 6850 "params": [ 6851 { 6852 "type": "TSTypeParameter", 6853 "name": { 6854 "type": "Identifier", 6855 "name": "R", 6856 "decorators": [], 6857 "loc": { 6858 "start": { 6859 "line": 68, 6860 "column": 8, 6861 "program": "test_generic.ts" 6862 }, 6863 "end": { 6864 "line": 68, 6865 "column": 9, 6866 "program": "test_generic.ts" 6867 } 6868 } 6869 }, 6870 "constraint": { 6871 "type": "TSTypeReference", 6872 "typeName": { 6873 "type": "Identifier", 6874 "name": "B", 6875 "decorators": [], 6876 "loc": { 6877 "start": { 6878 "line": 68, 6879 "column": 18, 6880 "program": "test_generic.ts" 6881 }, 6882 "end": { 6883 "line": 68, 6884 "column": 19, 6885 "program": "test_generic.ts" 6886 } 6887 } 6888 }, 6889 "loc": { 6890 "start": { 6891 "line": 68, 6892 "column": 18, 6893 "program": "test_generic.ts" 6894 }, 6895 "end": { 6896 "line": 68, 6897 "column": 19, 6898 "program": "test_generic.ts" 6899 } 6900 } 6901 }, 6902 "loc": { 6903 "start": { 6904 "line": 68, 6905 "column": 8, 6906 "program": "test_generic.ts" 6907 }, 6908 "end": { 6909 "line": 68, 6910 "column": 20, 6911 "program": "test_generic.ts" 6912 } 6913 } 6914 }, 6915 { 6916 "type": "TSTypeParameter", 6917 "name": { 6918 "type": "Identifier", 6919 "name": "C", 6920 "decorators": [], 6921 "loc": { 6922 "start": { 6923 "line": 68, 6924 "column": 21, 6925 "program": "test_generic.ts" 6926 }, 6927 "end": { 6928 "line": 68, 6929 "column": 22, 6930 "program": "test_generic.ts" 6931 } 6932 } 6933 }, 6934 "loc": { 6935 "start": { 6936 "line": 68, 6937 "column": 21, 6938 "program": "test_generic.ts" 6939 }, 6940 "end": { 6941 "line": 68, 6942 "column": 23, 6943 "program": "test_generic.ts" 6944 } 6945 } 6946 }, 6947 { 6948 "type": "TSTypeParameter", 6949 "name": { 6950 "type": "Identifier", 6951 "name": "T", 6952 "decorators": [], 6953 "loc": { 6954 "start": { 6955 "line": 68, 6956 "column": 24, 6957 "program": "test_generic.ts" 6958 }, 6959 "end": { 6960 "line": 68, 6961 "column": 25, 6962 "program": "test_generic.ts" 6963 } 6964 } 6965 }, 6966 "default": { 6967 "type": "TSNumberKeyword", 6968 "loc": { 6969 "start": { 6970 "line": 68, 6971 "column": 28, 6972 "program": "test_generic.ts" 6973 }, 6974 "end": { 6975 "line": 68, 6976 "column": 34, 6977 "program": "test_generic.ts" 6978 } 6979 } 6980 }, 6981 "loc": { 6982 "start": { 6983 "line": 68, 6984 "column": 24, 6985 "program": "test_generic.ts" 6986 }, 6987 "end": { 6988 "line": 68, 6989 "column": 35, 6990 "program": "test_generic.ts" 6991 } 6992 } 6993 } 6994 ], 6995 "loc": { 6996 "start": { 6997 "line": 68, 6998 "column": 7, 6999 "program": "test_generic.ts" 7000 }, 7001 "end": { 7002 "line": 68, 7003 "column": 35, 7004 "program": "test_generic.ts" 7005 } 7006 } 7007 }, 7008 "loc": { 7009 "start": { 7010 "line": 68, 7011 "column": 1, 7012 "program": "test_generic.ts" 7013 }, 7014 "end": { 7015 "line": 68, 7016 "column": 58, 7017 "program": "test_generic.ts" 7018 } 7019 } 7020 }, 7021 { 7022 "type": "EmptyStatement", 7023 "loc": { 7024 "start": { 7025 "line": 68, 7026 "column": 57, 7027 "program": "test_generic.ts" 7028 }, 7029 "end": { 7030 "line": 68, 7031 "column": 58, 7032 "program": "test_generic.ts" 7033 } 7034 } 7035 }, 7036 { 7037 "type": "TSTypeAliasDeclaration", 7038 "id": { 7039 "type": "Identifier", 7040 "name": "P", 7041 "decorators": [], 7042 "loc": { 7043 "start": { 7044 "line": 69, 7045 "column": 6, 7046 "program": "test_generic.ts" 7047 }, 7048 "end": { 7049 "line": 69, 7050 "column": 7, 7051 "program": "test_generic.ts" 7052 } 7053 } 7054 }, 7055 "typeAnnotation": { 7056 "type": "TSTypeLiteral", 7057 "members": [ 7058 { 7059 "type": "TSPropertySignature", 7060 "computed": false, 7061 "optional": false, 7062 "readonly": false, 7063 "key": { 7064 "type": "Identifier", 7065 "name": "a", 7066 "decorators": [], 7067 "loc": { 7068 "start": { 7069 "line": 69, 7070 "column": 52, 7071 "program": "test_generic.ts" 7072 }, 7073 "end": { 7074 "line": 69, 7075 "column": 53, 7076 "program": "test_generic.ts" 7077 } 7078 } 7079 }, 7080 "typeAnnotation": { 7081 "type": "TSTypeReference", 7082 "typeName": { 7083 "type": "Identifier", 7084 "name": "K", 7085 "decorators": [], 7086 "loc": { 7087 "start": { 7088 "line": 69, 7089 "column": 54, 7090 "program": "test_generic.ts" 7091 }, 7092 "end": { 7093 "line": 69, 7094 "column": 55, 7095 "program": "test_generic.ts" 7096 } 7097 } 7098 }, 7099 "loc": { 7100 "start": { 7101 "line": 69, 7102 "column": 54, 7103 "program": "test_generic.ts" 7104 }, 7105 "end": { 7106 "line": 69, 7107 "column": 55, 7108 "program": "test_generic.ts" 7109 } 7110 } 7111 }, 7112 "loc": { 7113 "start": { 7114 "line": 69, 7115 "column": 52, 7116 "program": "test_generic.ts" 7117 }, 7118 "end": { 7119 "line": 69, 7120 "column": 56, 7121 "program": "test_generic.ts" 7122 } 7123 } 7124 }, 7125 { 7126 "type": "TSPropertySignature", 7127 "computed": false, 7128 "optional": false, 7129 "readonly": false, 7130 "key": { 7131 "type": "Identifier", 7132 "name": "b", 7133 "decorators": [], 7134 "loc": { 7135 "start": { 7136 "line": 69, 7137 "column": 57, 7138 "program": "test_generic.ts" 7139 }, 7140 "end": { 7141 "line": 69, 7142 "column": 58, 7143 "program": "test_generic.ts" 7144 } 7145 } 7146 }, 7147 "typeAnnotation": { 7148 "type": "TSTypeReference", 7149 "typeName": { 7150 "type": "Identifier", 7151 "name": "Q", 7152 "decorators": [], 7153 "loc": { 7154 "start": { 7155 "line": 69, 7156 "column": 59, 7157 "program": "test_generic.ts" 7158 }, 7159 "end": { 7160 "line": 69, 7161 "column": 60, 7162 "program": "test_generic.ts" 7163 } 7164 } 7165 }, 7166 "loc": { 7167 "start": { 7168 "line": 69, 7169 "column": 59, 7170 "program": "test_generic.ts" 7171 }, 7172 "end": { 7173 "line": 69, 7174 "column": 60, 7175 "program": "test_generic.ts" 7176 } 7177 } 7178 }, 7179 "loc": { 7180 "start": { 7181 "line": 69, 7182 "column": 57, 7183 "program": "test_generic.ts" 7184 }, 7185 "end": { 7186 "line": 69, 7187 "column": 61, 7188 "program": "test_generic.ts" 7189 } 7190 } 7191 } 7192 ], 7193 "loc": { 7194 "start": { 7195 "line": 69, 7196 "column": 51, 7197 "program": "test_generic.ts" 7198 }, 7199 "end": { 7200 "line": 69, 7201 "column": 61, 7202 "program": "test_generic.ts" 7203 } 7204 } 7205 }, 7206 "typeParameters": { 7207 "type": "TSTypeParameterDeclaration", 7208 "params": [ 7209 { 7210 "type": "TSTypeParameter", 7211 "name": { 7212 "type": "Identifier", 7213 "name": "K", 7214 "decorators": [], 7215 "loc": { 7216 "start": { 7217 "line": 69, 7218 "column": 8, 7219 "program": "test_generic.ts" 7220 }, 7221 "end": { 7222 "line": 69, 7223 "column": 9, 7224 "program": "test_generic.ts" 7225 } 7226 } 7227 }, 7228 "loc": { 7229 "start": { 7230 "line": 69, 7231 "column": 8, 7232 "program": "test_generic.ts" 7233 }, 7234 "end": { 7235 "line": 69, 7236 "column": 10, 7237 "program": "test_generic.ts" 7238 } 7239 } 7240 }, 7241 { 7242 "type": "TSTypeParameter", 7243 "name": { 7244 "type": "Identifier", 7245 "name": "Q", 7246 "decorators": [], 7247 "loc": { 7248 "start": { 7249 "line": 69, 7250 "column": 11, 7251 "program": "test_generic.ts" 7252 }, 7253 "end": { 7254 "line": 69, 7255 "column": 12, 7256 "program": "test_generic.ts" 7257 } 7258 } 7259 }, 7260 "default": { 7261 "type": "TSUnionType", 7262 "types": [ 7263 { 7264 "type": "TSTupleType", 7265 "elementTypes": [ 7266 { 7267 "type": "TSNumberKeyword", 7268 "loc": { 7269 "start": { 7270 "line": 69, 7271 "column": 16, 7272 "program": "test_generic.ts" 7273 }, 7274 "end": { 7275 "line": 69, 7276 "column": 23, 7277 "program": "test_generic.ts" 7278 } 7279 } 7280 }, 7281 { 7282 "type": "TSNumberKeyword", 7283 "loc": { 7284 "start": { 7285 "line": 69, 7286 "column": 24, 7287 "program": "test_generic.ts" 7288 }, 7289 "end": { 7290 "line": 69, 7291 "column": 31, 7292 "program": "test_generic.ts" 7293 } 7294 } 7295 }, 7296 { 7297 "type": "TSStringKeyword", 7298 "loc": { 7299 "start": { 7300 "line": 69, 7301 "column": 32, 7302 "program": "test_generic.ts" 7303 }, 7304 "end": { 7305 "line": 69, 7306 "column": 39, 7307 "program": "test_generic.ts" 7308 } 7309 } 7310 } 7311 ], 7312 "loc": { 7313 "start": { 7314 "line": 69, 7315 "column": 15, 7316 "program": "test_generic.ts" 7317 }, 7318 "end": { 7319 "line": 69, 7320 "column": 39, 7321 "program": "test_generic.ts" 7322 } 7323 } 7324 }, 7325 { 7326 "type": "TSArrayType", 7327 "elementType": { 7328 "type": "TSAnyKeyword", 7329 "loc": { 7330 "start": { 7331 "line": 69, 7332 "column": 42, 7333 "program": "test_generic.ts" 7334 }, 7335 "end": { 7336 "line": 69, 7337 "column": 45, 7338 "program": "test_generic.ts" 7339 } 7340 } 7341 }, 7342 "annotations": [], 7343 "loc": { 7344 "start": { 7345 "line": 69, 7346 "column": 42, 7347 "program": "test_generic.ts" 7348 }, 7349 "end": { 7350 "line": 69, 7351 "column": 47, 7352 "program": "test_generic.ts" 7353 } 7354 } 7355 } 7356 ], 7357 "loc": { 7358 "start": { 7359 "line": 69, 7360 "column": 15, 7361 "program": "test_generic.ts" 7362 }, 7363 "end": { 7364 "line": 69, 7365 "column": 47, 7366 "program": "test_generic.ts" 7367 } 7368 } 7369 }, 7370 "loc": { 7371 "start": { 7372 "line": 69, 7373 "column": 11, 7374 "program": "test_generic.ts" 7375 }, 7376 "end": { 7377 "line": 69, 7378 "column": 48, 7379 "program": "test_generic.ts" 7380 } 7381 } 7382 } 7383 ], 7384 "loc": { 7385 "start": { 7386 "line": 69, 7387 "column": 7, 7388 "program": "test_generic.ts" 7389 }, 7390 "end": { 7391 "line": 69, 7392 "column": 48, 7393 "program": "test_generic.ts" 7394 } 7395 } 7396 }, 7397 "loc": { 7398 "start": { 7399 "line": 69, 7400 "column": 1, 7401 "program": "test_generic.ts" 7402 }, 7403 "end": { 7404 "line": 69, 7405 "column": 62, 7406 "program": "test_generic.ts" 7407 } 7408 } 7409 }, 7410 { 7411 "type": "EmptyStatement", 7412 "loc": { 7413 "start": { 7414 "line": 69, 7415 "column": 61, 7416 "program": "test_generic.ts" 7417 }, 7418 "end": { 7419 "line": 69, 7420 "column": 62, 7421 "program": "test_generic.ts" 7422 } 7423 } 7424 }, 7425 { 7426 "type": "ExpressionStatement", 7427 "expression": { 7428 "type": "CallExpression", 7429 "callee": { 7430 "type": "Identifier", 7431 "name": "async", 7432 "decorators": [], 7433 "loc": { 7434 "start": { 7435 "line": 71, 7436 "column": 1, 7437 "program": "test_generic.ts" 7438 }, 7439 "end": { 7440 "line": 71, 7441 "column": 6, 7442 "program": "test_generic.ts" 7443 } 7444 } 7445 }, 7446 "arguments": [], 7447 "optional": false, 7448 "typeParameters": { 7449 "type": "TSTypeParameterInstantiation", 7450 "params": [ 7451 { 7452 "type": "TSFunctionType", 7453 "params": [], 7454 "typeParameters": { 7455 "type": "TSTypeParameterDeclaration", 7456 "params": [ 7457 { 7458 "type": "TSTypeParameter", 7459 "name": { 7460 "type": "Identifier", 7461 "name": "A", 7462 "decorators": [], 7463 "loc": { 7464 "start": { 7465 "line": 71, 7466 "column": 8, 7467 "program": "test_generic.ts" 7468 }, 7469 "end": { 7470 "line": 71, 7471 "column": 9, 7472 "program": "test_generic.ts" 7473 } 7474 } 7475 }, 7476 "loc": { 7477 "start": { 7478 "line": 71, 7479 "column": 8, 7480 "program": "test_generic.ts" 7481 }, 7482 "end": { 7483 "line": 71, 7484 "column": 10, 7485 "program": "test_generic.ts" 7486 } 7487 } 7488 } 7489 ], 7490 "loc": { 7491 "start": { 7492 "line": 71, 7493 "column": 7, 7494 "program": "test_generic.ts" 7495 }, 7496 "end": { 7497 "line": 71, 7498 "column": 10, 7499 "program": "test_generic.ts" 7500 } 7501 } 7502 }, 7503 "returnType": { 7504 "type": "TSTypeLiteral", 7505 "members": [], 7506 "loc": { 7507 "start": { 7508 "line": 71, 7509 "column": 16, 7510 "program": "test_generic.ts" 7511 }, 7512 "end": { 7513 "line": 71, 7514 "column": 18, 7515 "program": "test_generic.ts" 7516 } 7517 } 7518 }, 7519 "loc": { 7520 "start": { 7521 "line": 71, 7522 "column": 7, 7523 "program": "test_generic.ts" 7524 }, 7525 "end": { 7526 "line": 71, 7527 "column": 18, 7528 "program": "test_generic.ts" 7529 } 7530 } 7531 } 7532 ], 7533 "loc": { 7534 "start": { 7535 "line": 71, 7536 "column": 6, 7537 "program": "test_generic.ts" 7538 }, 7539 "end": { 7540 "line": 71, 7541 "column": 19, 7542 "program": "test_generic.ts" 7543 } 7544 } 7545 }, 7546 "loc": { 7547 "start": { 7548 "line": 71, 7549 "column": 1, 7550 "program": "test_generic.ts" 7551 }, 7552 "end": { 7553 "line": 71, 7554 "column": 21, 7555 "program": "test_generic.ts" 7556 } 7557 } 7558 }, 7559 "loc": { 7560 "start": { 7561 "line": 71, 7562 "column": 1, 7563 "program": "test_generic.ts" 7564 }, 7565 "end": { 7566 "line": 71, 7567 "column": 22, 7568 "program": "test_generic.ts" 7569 } 7570 } 7571 }, 7572 { 7573 "type": "ExpressionStatement", 7574 "expression": { 7575 "type": "CallExpression", 7576 "callee": { 7577 "type": "Identifier", 7578 "name": "p", 7579 "decorators": [], 7580 "loc": { 7581 "start": { 7582 "line": 72, 7583 "column": 1, 7584 "program": "test_generic.ts" 7585 }, 7586 "end": { 7587 "line": 72, 7588 "column": 2, 7589 "program": "test_generic.ts" 7590 } 7591 } 7592 }, 7593 "arguments": [], 7594 "optional": false, 7595 "typeParameters": { 7596 "type": "TSTypeParameterInstantiation", 7597 "params": [ 7598 { 7599 "type": "TSNumberKeyword", 7600 "loc": { 7601 "start": { 7602 "line": 72, 7603 "column": 3, 7604 "program": "test_generic.ts" 7605 }, 7606 "end": { 7607 "line": 72, 7608 "column": 9, 7609 "program": "test_generic.ts" 7610 } 7611 } 7612 } 7613 ], 7614 "loc": { 7615 "start": { 7616 "line": 72, 7617 "column": 2, 7618 "program": "test_generic.ts" 7619 }, 7620 "end": { 7621 "line": 72, 7622 "column": 10, 7623 "program": "test_generic.ts" 7624 } 7625 } 7626 }, 7627 "loc": { 7628 "start": { 7629 "line": 72, 7630 "column": 1, 7631 "program": "test_generic.ts" 7632 }, 7633 "end": { 7634 "line": 72, 7635 "column": 12, 7636 "program": "test_generic.ts" 7637 } 7638 } 7639 }, 7640 "loc": { 7641 "start": { 7642 "line": 72, 7643 "column": 1, 7644 "program": "test_generic.ts" 7645 }, 7646 "end": { 7647 "line": 72, 7648 "column": 13, 7649 "program": "test_generic.ts" 7650 } 7651 } 7652 }, 7653 { 7654 "type": "ExpressionStatement", 7655 "expression": { 7656 "type": "ArrowFunctionExpression", 7657 "function": { 7658 "type": "ScriptFunction", 7659 "id": null, 7660 "generator": false, 7661 "async": false, 7662 "expression": true, 7663 "params": [], 7664 "returnType": { 7665 "type": "TSNumberKeyword", 7666 "loc": { 7667 "start": { 7668 "line": 73, 7669 "column": 17, 7670 "program": "test_generic.ts" 7671 }, 7672 "end": { 7673 "line": 73, 7674 "column": 23, 7675 "program": "test_generic.ts" 7676 } 7677 } 7678 }, 7679 "typeParameters": { 7680 "type": "TSTypeParameterDeclaration", 7681 "params": [ 7682 { 7683 "type": "TSTypeParameter", 7684 "name": { 7685 "type": "Identifier", 7686 "name": "A", 7687 "decorators": [], 7688 "loc": { 7689 "start": { 7690 "line": 73, 7691 "column": 2, 7692 "program": "test_generic.ts" 7693 }, 7694 "end": { 7695 "line": 73, 7696 "column": 3, 7697 "program": "test_generic.ts" 7698 } 7699 } 7700 }, 7701 "constraint": { 7702 "type": "TSTypeReference", 7703 "typeName": { 7704 "type": "Identifier", 7705 "name": "B", 7706 "decorators": [], 7707 "loc": { 7708 "start": { 7709 "line": 73, 7710 "column": 12, 7711 "program": "test_generic.ts" 7712 }, 7713 "end": { 7714 "line": 73, 7715 "column": 13, 7716 "program": "test_generic.ts" 7717 } 7718 } 7719 }, 7720 "loc": { 7721 "start": { 7722 "line": 73, 7723 "column": 12, 7724 "program": "test_generic.ts" 7725 }, 7726 "end": { 7727 "line": 73, 7728 "column": 13, 7729 "program": "test_generic.ts" 7730 } 7731 } 7732 }, 7733 "loc": { 7734 "start": { 7735 "line": 73, 7736 "column": 2, 7737 "program": "test_generic.ts" 7738 }, 7739 "end": { 7740 "line": 73, 7741 "column": 14, 7742 "program": "test_generic.ts" 7743 } 7744 } 7745 } 7746 ], 7747 "loc": { 7748 "start": { 7749 "line": 73, 7750 "column": 1, 7751 "program": "test_generic.ts" 7752 }, 7753 "end": { 7754 "line": 73, 7755 "column": 14, 7756 "program": "test_generic.ts" 7757 } 7758 } 7759 }, 7760 "body": { 7761 "type": "BooleanLiteral", 7762 "value": true, 7763 "loc": { 7764 "start": { 7765 "line": 73, 7766 "column": 27, 7767 "program": "test_generic.ts" 7768 }, 7769 "end": { 7770 "line": 73, 7771 "column": 31, 7772 "program": "test_generic.ts" 7773 } 7774 } 7775 }, 7776 "loc": { 7777 "start": { 7778 "line": 73, 7779 "column": 1, 7780 "program": "test_generic.ts" 7781 }, 7782 "end": { 7783 "line": 73, 7784 "column": 31, 7785 "program": "test_generic.ts" 7786 } 7787 } 7788 }, 7789 "loc": { 7790 "start": { 7791 "line": 73, 7792 "column": 1, 7793 "program": "test_generic.ts" 7794 }, 7795 "end": { 7796 "line": 73, 7797 "column": 31, 7798 "program": "test_generic.ts" 7799 } 7800 } 7801 }, 7802 "loc": { 7803 "start": { 7804 "line": 73, 7805 "column": 1, 7806 "program": "test_generic.ts" 7807 }, 7808 "end": { 7809 "line": 73, 7810 "column": 32, 7811 "program": "test_generic.ts" 7812 } 7813 } 7814 }, 7815 { 7816 "type": "ExpressionStatement", 7817 "expression": { 7818 "type": "ArrowFunctionExpression", 7819 "function": { 7820 "type": "ScriptFunction", 7821 "id": null, 7822 "generator": false, 7823 "async": true, 7824 "expression": false, 7825 "params": [], 7826 "typeParameters": { 7827 "type": "TSTypeParameterDeclaration", 7828 "params": [ 7829 { 7830 "type": "TSTypeParameter", 7831 "name": { 7832 "type": "Identifier", 7833 "name": "A", 7834 "decorators": [], 7835 "loc": { 7836 "start": { 7837 "line": 74, 7838 "column": 7, 7839 "program": "test_generic.ts" 7840 }, 7841 "end": { 7842 "line": 74, 7843 "column": 8, 7844 "program": "test_generic.ts" 7845 } 7846 } 7847 }, 7848 "constraint": { 7849 "type": "TSTypeOperator", 7850 "operator": "readonly", 7851 "typeAnnotation": { 7852 "type": "TSTupleType", 7853 "elementTypes": [ 7854 { 7855 "type": "TSNumberKeyword", 7856 "loc": { 7857 "start": { 7858 "line": 74, 7859 "column": 27, 7860 "program": "test_generic.ts" 7861 }, 7862 "end": { 7863 "line": 74, 7864 "column": 34, 7865 "program": "test_generic.ts" 7866 } 7867 } 7868 }, 7869 { 7870 "type": "TSStringKeyword", 7871 "loc": { 7872 "start": { 7873 "line": 74, 7874 "column": 35, 7875 "program": "test_generic.ts" 7876 }, 7877 "end": { 7878 "line": 74, 7879 "column": 42, 7880 "program": "test_generic.ts" 7881 } 7882 } 7883 } 7884 ], 7885 "loc": { 7886 "start": { 7887 "line": 74, 7888 "column": 26, 7889 "program": "test_generic.ts" 7890 }, 7891 "end": { 7892 "line": 74, 7893 "column": 42, 7894 "program": "test_generic.ts" 7895 } 7896 } 7897 }, 7898 "loc": { 7899 "start": { 7900 "line": 74, 7901 "column": 17, 7902 "program": "test_generic.ts" 7903 }, 7904 "end": { 7905 "line": 74, 7906 "column": 42, 7907 "program": "test_generic.ts" 7908 } 7909 } 7910 }, 7911 "loc": { 7912 "start": { 7913 "line": 74, 7914 "column": 7, 7915 "program": "test_generic.ts" 7916 }, 7917 "end": { 7918 "line": 74, 7919 "column": 43, 7920 "program": "test_generic.ts" 7921 } 7922 } 7923 } 7924 ], 7925 "loc": { 7926 "start": { 7927 "line": 74, 7928 "column": 6, 7929 "program": "test_generic.ts" 7930 }, 7931 "end": { 7932 "line": 74, 7933 "column": 43, 7934 "program": "test_generic.ts" 7935 } 7936 } 7937 }, 7938 "body": { 7939 "type": "BlockStatement", 7940 "statements": [ 7941 { 7942 "type": "ReturnStatement", 7943 "argument": { 7944 "type": "StringLiteral", 7945 "value": "foo", 7946 "loc": { 7947 "start": { 7948 "line": 74, 7949 "column": 57, 7950 "program": "test_generic.ts" 7951 }, 7952 "end": { 7953 "line": 74, 7954 "column": 62, 7955 "program": "test_generic.ts" 7956 } 7957 } 7958 }, 7959 "loc": { 7960 "start": { 7961 "line": 74, 7962 "column": 50, 7963 "program": "test_generic.ts" 7964 }, 7965 "end": { 7966 "line": 74, 7967 "column": 63, 7968 "program": "test_generic.ts" 7969 } 7970 } 7971 } 7972 ], 7973 "loc": { 7974 "start": { 7975 "line": 74, 7976 "column": 49, 7977 "program": "test_generic.ts" 7978 }, 7979 "end": { 7980 "line": 74, 7981 "column": 64, 7982 "program": "test_generic.ts" 7983 } 7984 } 7985 }, 7986 "loc": { 7987 "start": { 7988 "line": 74, 7989 "column": 1, 7990 "program": "test_generic.ts" 7991 }, 7992 "end": { 7993 "line": 74, 7994 "column": 64, 7995 "program": "test_generic.ts" 7996 } 7997 } 7998 }, 7999 "loc": { 8000 "start": { 8001 "line": 74, 8002 "column": 1, 8003 "program": "test_generic.ts" 8004 }, 8005 "end": { 8006 "line": 74, 8007 "column": 64, 8008 "program": "test_generic.ts" 8009 } 8010 } 8011 }, 8012 "loc": { 8013 "start": { 8014 "line": 74, 8015 "column": 1, 8016 "program": "test_generic.ts" 8017 }, 8018 "end": { 8019 "line": 74, 8020 "column": 65, 8021 "program": "test_generic.ts" 8022 } 8023 } 8024 } 8025 ], 8026 "loc": { 8027 "start": { 8028 "line": 1, 8029 "column": 1, 8030 "program": "test_generic.ts" 8031 }, 8032 "end": { 8033 "line": 75, 8034 "column": 1, 8035 "program": "test_generic.ts" 8036 } 8037 } 8038} 8039