1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031
|
//// [genericDefaults.ts]
interface A { a: number; }
interface B { b: number; }
interface C { c: number; }
interface D { d: number; }
interface AB { a: number; b: number; }
interface BC { b: number; c: number; }
declare const a: A;
declare const b: B;
declare const c: C;
declare const d: D;
declare const ab: AB;
declare const bc: BC;
declare const x: any;
// function without type parameters
declare function f00(a?: A): A;
// no inference
f00();
f00(a);
// function with a type parameter without a default
declare function f01<T>(a?: T): T;
// inference
f01();
f01(a);
// no inference, fully supplied
f01<A>();
f01<A>(a);
// function with a type paramter with a default
declare function f02<T = A>(a?: T): T;
// inference
f02();
f02(a);
f02(b);
// no inference, fully supplied
f02<A>();
f02<A>(a);
f02<B>();
f02<B>(b);
// function with a type parameter with a default that refers to itself
declare function f03<T = T>(a?: T): T;
// inference
f03();
f03(a);
f03(b);
// no inference, fully supplied
f03<A>();
f03<A>(a);
f03<B>();
f03<B>(b);
// function with a type paramter without a default and a type parameter with a default
declare function f04<T, U = B>(a?: T, b?: U): [T, U];
// inference
f04();
f04(a);
f04(a, b);
f04(a, c);
// no inference, partially supplied
f04<A>();
f04<A>(a);
f04<A>(a, b);
// no inference, fully supplied
f04<A, B>();
f04<A, B>(a);
f04<A, B>(a, b);
f04<A, C>();
f04<A, C>(a);
f04<A, C>(a, c);
// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter
declare function f05<T, U = T>(a?: T, b?: U): [T, U];
// inference
f05();
f05(a);
f05(a, a);
f05(a, b);
// no inference, partially supplied
f05<A>();
f05<A>(a);
f05<A>(a, a);
// no inference, fully supplied
f05<A, B>();
f05<A, B>(a);
f05<A, B>(a, b);
// function with a type parameter with a default that refers to an earlier type parameter with a default
declare function f06<T = A, U = T>(a?: T, b?: U): [T, U];
// inference
f06();
f06(a);
f06(a, a);
f06(a, b);
f06(b, a);
f06(b, b);
// no inference, partially supplied
f06<A>();
f06<A>(a);
f06<A>(a, a);
f06<B>();
f06<B>(b);
f06<B>(b, b);
// no inference, fully supplied
f06<A, B>();
f06<A, B>(a);
f06<A, B>(a, b);
f06<B, C>();
f06<B, C>(b);
f06<B, C>(b, c);
// function with a type parameter without a default and a type parameter with a default that refers to an earlier type parameter with a default
declare function f07<T, U = B, V = U>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f07();
f07(a, b);
f07(a, c);
f07(a, b, b);
f07(a, b, c);
f07(a, c, b);
f07(a, c, c);
// no inference, partially supplied
f07<A>();
f07<A>(a);
f07<A>(a, b);
f07<A>(a, b, b);
f07<A, B>();
f07<A, B>(a);
f07<A, B>(a, b);
f07<A, B>(a, b, b);
f07<A, C>();
f07<A, C>(a);
f07<A, C>(a, c);
f07<A, C>(a, c, c);
// no inference, fully supplied
f07<A, B, C>();
f07<A, B, C>(a);
f07<A, B, C>(a, b);
f07<A, B, C>(a, b, c);
f07<A, C, A>();
f07<A, C, A>(a);
f07<A, C, D>(a, c);
f07<A, C, D>(a, c, d);
// function with a type parameter with a default that refers to an earlier type parameter with a constraint
declare function f08<T extends A, U = T>(a?: T, b?: U): [T, U];
// inference
f08();
f08(a);
f08(a, a);
f08(a, b);
// no inference, partially supplied
f08<A>();
f08<A>(a);
f08<A>(a, a);
// no inference, fully supplied
f08<A, B>();
f08<A, B>(a);
f08<A, B>(a, b);
// function with a type parameter with a constraint and a default that refers to an earlier type parameter
declare function f09<T, U extends T = T>(a?: T, b?: U): [T, U];
// inference
f09();
f09(a);
f09(a, a);
f09(a, ab);
// no inference, partially supplied
f09<A>();
f09<A>(a);
f09<A>(a, a);
f09<A>(a, ab);
// no inference, fully supplied
f09<A, AB>();
f09<A, AB>(a);
f09<A, AB>(a, ab);
// function with a type parameter with a constraint and a default that refers to an earlier type parameter with a constraint
declare function f10<T extends A, U extends T = T>(a?: T, b?: U): [T, U];
// inference
f10();
f10(a);
f10(a, a);
f10(a, ab);
// no inference, partially supplied
f10<A>();
f10<A>(a);
f10<A>(a, a);
f10<A>(a, ab);
// no inference, fully supplied
f10<A, A>();
f10<A, A>(a);
f10<A, A>(a, a);
f10<A, A>(a, ab);
f10<A, AB>();
f10<A, AB>(a);
f10<A, AB>(a, ab);
// function with a type parameter with a default that refers to an earier type parameter in a union
declare function f11<T, U = T | B>(a?: T, b?: U): [T, U];
// inference
f11();
f11(a);
f11(a, a);
f11(a, b);
f11(a, c);
// no inference, partially supplied
f11<A>();
f11<A>(a);
f11<A>(a, a);
f11<A>(a, b);
// no inference, fully supplied
f11<A, C>();
f11<A, C>(a);
f11<A, C>(a, c);
// function with a type parameter with a default that refers to an earlier type parameter in an intersection
declare function f12<T, U = T & B>(a?: T, b?: U): [T, U];
// inference
f12();
f12(a);
f12(a, a);
f12(a, b);
f12(a, c);
// no inference, partially supplied
f12<A>();
f12<A>(a);
f12<A>(a, ab);
// no inference, fully supplied
f12<A, C>();
f12<A, C>(a);
f12<A, C>(a, c);
// function with a type parameter with a default that refers to a later type parameter with a default
declare function f13<T = U, U = B>(a?: T, b?: U): [T, U];
// inference
f13();
f13(a);
f13(a, b);
f13(a, c);
// no inference, partially supplied
f13<A>();
f13<A>(a);
f13<A>(a, b);
// no inference, fully supplied
f13<A, C>();
f13<A, C>(a);
f13<A, C>(a, c);
f13<A, C>(a, c);
// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default
declare function f14<T, U = V, V = C>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f14();
f14(a);
f14(a, b);
f14(a, b, c);
f14(a, b, d);
// no inference, partially supplied
f14<A>();
f14<A>(a);
f14<A>(a, b);
f14<A>(a, b, c);
f14<A, B>();
f14<A, B>(a);
f14<A, B>(a, b);
f14<A, B>(a, b, c);
// no inference fully supplied
f14<A, B, D>();
f14<A, B, D>(a);
f14<A, B, D>(a, b);
f14<A, B, D>(a, b, d);
// function with two type parameters with defaults that mutually refer to each other
declare function f15<T = U, U = T>(a?: T, b?: U): [T, U];
// inference
f15();
f15(a);
f15(a, b);
// no inference, partially supplied
f15<A>();
f15<A>(a);
f15<A>(a, a);
// no inference, fully supplied
f15<A, B>();
f15<A, B>(a);
f15<A, B>(a, b);
// function with a type parameter without a default and two type parameters with defaults that mutually refer to each other
declare function f16<T, U = V, V = U>(a?: T, b?: U, c?: V): [T, U, V];
// no inference
f16();
f16(a);
f16(a, b);
f16(a, b, b);
// no inference, partially supplied
f16<A>();
f16<A>(a);
f16<A>(a, b);
f16<A>(a, b, b);
f16<A, B>();
f16<A, B>(a);
f16<A, B>(a, b);
f16<A, B>(a, b, b);
// no inference, fully supplied
f16<A, B, D>();
f16<A, B, D>(a);
f16<A, B, D>(a, b);
f16<A, B, D>(a, b, d);
// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union
declare function f17<T = U, U = T | B>(a?: T, b?: U): [T, U];
// inference
f17();
f17(a);
f17(a, a);
f17(a, b);
f17(a, c);
// no inference, partially supplied
f17<A>();
f17<A>(a);
f17<A>(a, a);
f17<A>(a, b);
// no inference, fully supplied
f17<A, C>();
f17<A, C>(a);
f17<A, C>(a, c);
// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in a union
declare function f18<T, U = V, V = U | C>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f18();
f18(a);
f18(a, b);
f18(a, b, b);
f18(a, b, c);
// no inference, partially supplied
f18<A>();
f18<A>(a);
f18<A>(a, b);
f18<A>(a, b, b);
f18<A>(a, b, c);
f18<A, B>();
f18<A, B>(a);
f18<A, B>(a, b);
f18<A, B>(a, b, b);
f18<A, B>(a, b, c);
// no inference, fully supplied
f18<A, B, D>();
f18<A, B, D>(a);
f18<A, B, D>(a, b);
f18<A, B, D>(a, b, d);
// function with a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection
declare function f19<T = U, U = T & B>(a?: T, b?: U): [T, U];
// inference
f19();
f19(a);
f19(a, a);
f19(a, b);
f19(a, ab);
f19(a, c);
// no inference, partially supplied
f19<A>();
f19<A>(a);
f19<A>(a, ab);
// no inference, fully supplied
f19<A, C>();
f19<A, C>(a);
f19<A, C>(a, c);
// function with a type parameter without a default and a type parameter with a default that refers to a later type parameter with a default that refers to an earlier type parameter in an intersection
declare function f20<T, U = V, V = U & C>(a?: T, b?: U, c?: V): [T, U, V];
// inference
f20();
f20(a);
f20(a, b);
f20(a, b, c);
// no inference, partially supplied
f20<A>();
f20<A>(a);
f20<A>(a, b);
f20<A>(a, b, bc);
f20<A, B>();
f20<A, B>(a);
f20<A, B>(a, b);
f20<A, B>(a, b, bc);
// no inference, fully supplied
f20<A, B, D>();
f20<A, B, D>(a);
f20<A, B, D>(a, b);
f20<A, B, D>(a, b, d);
interface i00<T = number> { a: T; }
const i00c00 = (<i00>x).a;
const i00c01 = (<i00<number>>x).a;
interface i01<T, U = T> { a: [T, U]; }
const i01c00 = (<i01<number>>x).a;
const i01c01 = (<i01<number, string>>x).a;
interface i02<T extends number, U = T> { a: [T, U]; }
const i02c00 = (<i02<number>>x).a;
const i02c01 = (<i02<1>>x).a;
const i02c02 = (<i02<number, number>>x).a;
const i02c03 = (<i02<1, number>>x).a;
const i02c04 = (<i02<number, 1>>x).a;
interface i03<T extends number, U extends T = T> { a: [T, U]; }
const i03c00 = (<i03<number>>x).a;
const i03c01 = (<i03<1>>x).a;
const i03c02 = (<i03<number, number>>x).a;
const i03c03 = (<i03<1, 1>>x).a;
const i03c04 = (<i03<number, 1>>x).a;
interface i04 {}
interface i04<T> {}
interface i04<T = number> {}
interface i04<T = number, U = string> {}
interface i05<T = T> { a: T; }
const i05c00 = (<i05>x).a;
const i05c01 = (<i05<number>>x).a;
interface i06<T = U, U = T> { a: [T, U]; }
const i06c00 = (<i06>x).a;
const i06c01 = (<i06<number>>x).a;
const i06c02 = (<i06<number, string>>x).a;
interface i07 { a: A; }
interface i07<A = number> { b: A; }
const i07c00 = (<i07>x).a;
const i07c01 = (<i07>x).b;
const i07c02 = (<i07<B>>x).a;
const i07c03 = (<i07<B>>x).b;
interface Base01<T> { a: T; }
interface Base01Constructor { new <T = number>(a?: T): Base01<T>; }
declare const Base01: Base01Constructor;
const Base01c00 = new Base01();
const Base01c01 = new Base01(1);
const Base01c02 = new Base01<number>();
const Base01c03 = new Base01<number>(1);
declare class Derived01<T> extends Base01<T> { }
const Derived01c00 = new Derived01();
const Derived01c01 = new Derived01(1);
const Derived01c02 = new Derived01<number>();
const Derived01c03 = new Derived01<number>(1);
declare class Derived02<T = string> extends Base01<T> { }
const Derived02c00 = new Derived02();
const Derived02c01 = new Derived02(1);
const Derived02c02 = new Derived02<number>();
const Derived02c03 = new Derived02<number>(1);
// https://github.com/Microsoft/TypeScript/issues/16211
interface Base02 {}
interface Base02Constructor { new <T = A>(a: T): Base02 & T; }
declare const Base02: Base02Constructor;
declare class Derived03 extends Base02 {}
const Derived03c00 = new Derived03(ab);
const Derived03c01 = Derived03c00.a;
type DerivedProps = keyof Derived03;
type t00<T = number> = { a: T; }
const t00c00 = (<t00>x).a;
const t00c01 = (<t00<number>>x).a;
type t01<T, U = T> = { a: [T, U]; }
const t01c00 = (<t01<number>>x).a;
const t01c01 = (<t01<number, string>>x).a;
type t02<T extends number, U = T> = { a: [T, U]; }
const t02c00 = (<t02<number>>x).a;
const t02c01 = (<t02<1>>x).a;
const t02c02 = (<t02<number, number>>x).a;
const t02c03 = (<t02<1, number>>x).a;
const t02c04 = (<t02<number, 1>>x).a;
type t03<T extends number, U extends T = T> = { a: [T, U]; }
const t03c00 = (<t03<number>>x).a;
const t03c01 = (<t03<1>>x).a;
const t03c02 = (<t03<number, number>>x).a;
const t03c03 = (<t03<1, 1>>x).a;
const t03c04 = (<t03<number, 1>>x).a;
// https://github.com/Microsoft/TypeScript/issues/16221
interface SelfReference<T = SelfReference<string>> {}
//// [genericDefaults.js]
// no inference
f00();
f00(a);
// inference
f01();
f01(a);
// no inference, fully supplied
f01();
f01(a);
// inference
f02();
f02(a);
f02(b);
// no inference, fully supplied
f02();
f02(a);
f02();
f02(b);
// inference
f03();
f03(a);
f03(b);
// no inference, fully supplied
f03();
f03(a);
f03();
f03(b);
// inference
f04();
f04(a);
f04(a, b);
f04(a, c);
// no inference, partially supplied
f04();
f04(a);
f04(a, b);
// no inference, fully supplied
f04();
f04(a);
f04(a, b);
f04();
f04(a);
f04(a, c);
// inference
f05();
f05(a);
f05(a, a);
f05(a, b);
// no inference, partially supplied
f05();
f05(a);
f05(a, a);
// no inference, fully supplied
f05();
f05(a);
f05(a, b);
// inference
f06();
f06(a);
f06(a, a);
f06(a, b);
f06(b, a);
f06(b, b);
// no inference, partially supplied
f06();
f06(a);
f06(a, a);
f06();
f06(b);
f06(b, b);
// no inference, fully supplied
f06();
f06(a);
f06(a, b);
f06();
f06(b);
f06(b, c);
// inference
f07();
f07(a, b);
f07(a, c);
f07(a, b, b);
f07(a, b, c);
f07(a, c, b);
f07(a, c, c);
// no inference, partially supplied
f07();
f07(a);
f07(a, b);
f07(a, b, b);
f07();
f07(a);
f07(a, b);
f07(a, b, b);
f07();
f07(a);
f07(a, c);
f07(a, c, c);
// no inference, fully supplied
f07();
f07(a);
f07(a, b);
f07(a, b, c);
f07();
f07(a);
f07(a, c);
f07(a, c, d);
// inference
f08();
f08(a);
f08(a, a);
f08(a, b);
// no inference, partially supplied
f08();
f08(a);
f08(a, a);
// no inference, fully supplied
f08();
f08(a);
f08(a, b);
// inference
f09();
f09(a);
f09(a, a);
f09(a, ab);
// no inference, partially supplied
f09();
f09(a);
f09(a, a);
f09(a, ab);
// no inference, fully supplied
f09();
f09(a);
f09(a, ab);
// inference
f10();
f10(a);
f10(a, a);
f10(a, ab);
// no inference, partially supplied
f10();
f10(a);
f10(a, a);
f10(a, ab);
// no inference, fully supplied
f10();
f10(a);
f10(a, a);
f10(a, ab);
f10();
f10(a);
f10(a, ab);
// inference
f11();
f11(a);
f11(a, a);
f11(a, b);
f11(a, c);
// no inference, partially supplied
f11();
f11(a);
f11(a, a);
f11(a, b);
// no inference, fully supplied
f11();
f11(a);
f11(a, c);
// inference
f12();
f12(a);
f12(a, a);
f12(a, b);
f12(a, c);
// no inference, partially supplied
f12();
f12(a);
f12(a, ab);
// no inference, fully supplied
f12();
f12(a);
f12(a, c);
// inference
f13();
f13(a);
f13(a, b);
f13(a, c);
// no inference, partially supplied
f13();
f13(a);
f13(a, b);
// no inference, fully supplied
f13();
f13(a);
f13(a, c);
f13(a, c);
// inference
f14();
f14(a);
f14(a, b);
f14(a, b, c);
f14(a, b, d);
// no inference, partially supplied
f14();
f14(a);
f14(a, b);
f14(a, b, c);
f14();
f14(a);
f14(a, b);
f14(a, b, c);
// no inference fully supplied
f14();
f14(a);
f14(a, b);
f14(a, b, d);
// inference
f15();
f15(a);
f15(a, b);
// no inference, partially supplied
f15();
f15(a);
f15(a, a);
// no inference, fully supplied
f15();
f15(a);
f15(a, b);
// no inference
f16();
f16(a);
f16(a, b);
f16(a, b, b);
// no inference, partially supplied
f16();
f16(a);
f16(a, b);
f16(a, b, b);
f16();
f16(a);
f16(a, b);
f16(a, b, b);
// no inference, fully supplied
f16();
f16(a);
f16(a, b);
f16(a, b, d);
// inference
f17();
f17(a);
f17(a, a);
f17(a, b);
f17(a, c);
// no inference, partially supplied
f17();
f17(a);
f17(a, a);
f17(a, b);
// no inference, fully supplied
f17();
f17(a);
f17(a, c);
// inference
f18();
f18(a);
f18(a, b);
f18(a, b, b);
f18(a, b, c);
// no inference, partially supplied
f18();
f18(a);
f18(a, b);
f18(a, b, b);
f18(a, b, c);
f18();
f18(a);
f18(a, b);
f18(a, b, b);
f18(a, b, c);
// no inference, fully supplied
f18();
f18(a);
f18(a, b);
f18(a, b, d);
// inference
f19();
f19(a);
f19(a, a);
f19(a, b);
f19(a, ab);
f19(a, c);
// no inference, partially supplied
f19();
f19(a);
f19(a, ab);
// no inference, fully supplied
f19();
f19(a);
f19(a, c);
// inference
f20();
f20(a);
f20(a, b);
f20(a, b, c);
// no inference, partially supplied
f20();
f20(a);
f20(a, b);
f20(a, b, bc);
f20();
f20(a);
f20(a, b);
f20(a, b, bc);
// no inference, fully supplied
f20();
f20(a);
f20(a, b);
f20(a, b, d);
var i00c00 = x.a;
var i00c01 = x.a;
var i01c00 = x.a;
var i01c01 = x.a;
var i02c00 = x.a;
var i02c01 = x.a;
var i02c02 = x.a;
var i02c03 = x.a;
var i02c04 = x.a;
var i03c00 = x.a;
var i03c01 = x.a;
var i03c02 = x.a;
var i03c03 = x.a;
var i03c04 = x.a;
var i05c00 = x.a;
var i05c01 = x.a;
var i06c00 = x.a;
var i06c01 = x.a;
var i06c02 = x.a;
var i07c00 = x.a;
var i07c01 = x.b;
var i07c02 = x.a;
var i07c03 = x.b;
var Base01c00 = new Base01();
var Base01c01 = new Base01(1);
var Base01c02 = new Base01();
var Base01c03 = new Base01(1);
var Derived01c00 = new Derived01();
var Derived01c01 = new Derived01(1);
var Derived01c02 = new Derived01();
var Derived01c03 = new Derived01(1);
var Derived02c00 = new Derived02();
var Derived02c01 = new Derived02(1);
var Derived02c02 = new Derived02();
var Derived02c03 = new Derived02(1);
var Derived03c00 = new Derived03(ab);
var Derived03c01 = Derived03c00.a;
var t00c00 = x.a;
var t00c01 = x.a;
var t01c00 = x.a;
var t01c01 = x.a;
var t02c00 = x.a;
var t02c01 = x.a;
var t02c02 = x.a;
var t02c03 = x.a;
var t02c04 = x.a;
var t03c00 = x.a;
var t03c01 = x.a;
var t03c02 = x.a;
var t03c03 = x.a;
var t03c04 = x.a;
//// [genericDefaults.d.ts]
interface A {
a: number;
}
interface B {
b: number;
}
interface C {
c: number;
}
interface D {
d: number;
}
interface AB {
a: number;
b: number;
}
interface BC {
b: number;
c: number;
}
declare const a: A;
declare const b: B;
declare const c: C;
declare const d: D;
declare const ab: AB;
declare const bc: BC;
declare const x: any;
declare function f00(a?: A): A;
declare function f01<T>(a?: T): T;
declare function f02<T = A>(a?: T): T;
declare function f03<T = T>(a?: T): T;
declare function f04<T, U = B>(a?: T, b?: U): [T, U];
declare function f05<T, U = T>(a?: T, b?: U): [T, U];
declare function f06<T = A, U = T>(a?: T, b?: U): [T, U];
declare function f07<T, U = B, V = U>(a?: T, b?: U, c?: V): [T, U, V];
declare function f08<T extends A, U = T>(a?: T, b?: U): [T, U];
declare function f09<T, U extends T = T>(a?: T, b?: U): [T, U];
declare function f10<T extends A, U extends T = T>(a?: T, b?: U): [T, U];
declare function f11<T, U = T | B>(a?: T, b?: U): [T, U];
declare function f12<T, U = T & B>(a?: T, b?: U): [T, U];
declare function f13<T = U, U = B>(a?: T, b?: U): [T, U];
declare function f14<T, U = V, V = C>(a?: T, b?: U, c?: V): [T, U, V];
declare function f15<T = U, U = T>(a?: T, b?: U): [T, U];
declare function f16<T, U = V, V = U>(a?: T, b?: U, c?: V): [T, U, V];
declare function f17<T = U, U = T | B>(a?: T, b?: U): [T, U];
declare function f18<T, U = V, V = U | C>(a?: T, b?: U, c?: V): [T, U, V];
declare function f19<T = U, U = T & B>(a?: T, b?: U): [T, U];
declare function f20<T, U = V, V = U & C>(a?: T, b?: U, c?: V): [T, U, V];
interface i00<T = number> {
a: T;
}
declare const i00c00: number;
declare const i00c01: number;
interface i01<T, U = T> {
a: [T, U];
}
declare const i01c00: [number, number];
declare const i01c01: [number, string];
interface i02<T extends number, U = T> {
a: [T, U];
}
declare const i02c00: [number, number];
declare const i02c01: [1, 1];
declare const i02c02: [number, number];
declare const i02c03: [1, number];
declare const i02c04: [number, 1];
interface i03<T extends number, U extends T = T> {
a: [T, U];
}
declare const i03c00: [number, number];
declare const i03c01: [1, 1];
declare const i03c02: [number, number];
declare const i03c03: [1, 1];
declare const i03c04: [number, 1];
interface i04 {
}
interface i04<T> {
}
interface i04<T = number> {
}
interface i04<T = number, U = string> {
}
interface i05<T = T> {
a: T;
}
declare const i05c00: any;
declare const i05c01: number;
interface i06<T = U, U = T> {
a: [T, U];
}
declare const i06c00: [any, any];
declare const i06c01: [number, number];
declare const i06c02: [number, string];
interface i07 {
a: A;
}
interface i07<A = number> {
b: A;
}
declare const i07c00: A;
declare const i07c01: number;
declare const i07c02: A;
declare const i07c03: B;
interface Base01<T> {
a: T;
}
interface Base01Constructor {
new <T = number>(a?: T): Base01<T>;
}
declare const Base01: Base01Constructor;
declare const Base01c00: Base01<number>;
declare const Base01c01: Base01<number>;
declare const Base01c02: Base01<number>;
declare const Base01c03: Base01<number>;
declare class Derived01<T> extends Base01<T> {
}
declare const Derived01c00: Derived01<{}>;
declare const Derived01c01: Derived01<number>;
declare const Derived01c02: Derived01<number>;
declare const Derived01c03: Derived01<number>;
declare class Derived02<T = string> extends Base01<T> {
}
declare const Derived02c00: Derived02<string>;
declare const Derived02c01: Derived02<number>;
declare const Derived02c02: Derived02<number>;
declare const Derived02c03: Derived02<number>;
interface Base02 {
}
interface Base02Constructor {
new <T = A>(a: T): Base02 & T;
}
declare const Base02: Base02Constructor;
declare class Derived03 extends Base02 {
}
declare const Derived03c00: Derived03;
declare const Derived03c01: number;
declare type DerivedProps = keyof Derived03;
declare type t00<T = number> = {
a: T;
};
declare const t00c00: number;
declare const t00c01: number;
declare type t01<T, U = T> = {
a: [T, U];
};
declare const t01c00: [number, number];
declare const t01c01: [number, string];
declare type t02<T extends number, U = T> = {
a: [T, U];
};
declare const t02c00: [number, number];
declare const t02c01: [1, 1];
declare const t02c02: [number, number];
declare const t02c03: [1, number];
declare const t02c04: [number, 1];
declare type t03<T extends number, U extends T = T> = {
a: [T, U];
};
declare const t03c00: [number, number];
declare const t03c01: [1, 1];
declare const t03c02: [number, number];
declare const t03c03: [1, 1];
declare const t03c04: [number, 1];
interface SelfReference<T = SelfReference<string>> {
}
|