32 lines
1.4 KiB
Plaintext
32 lines
1.4 KiB
Plaintext
|
=== tests/cases/compiler/overloadsAndTypeArgumentArity.ts ===
|
||
|
declare function Callbacks(flags?: string): void;
|
||
|
>Callbacks : { (flags?: string): void; <T>(flags?: string): void; <T1, T2>(flags?: string): void; <T1, T2, T3>(flags?: string): void; }
|
||
|
>flags : string
|
||
|
|
||
|
declare function Callbacks<T>(flags?: string): void;
|
||
|
>Callbacks : { (flags?: string): void; <T>(flags?: string): void; <T1, T2>(flags?: string): void; <T1, T2, T3>(flags?: string): void; }
|
||
|
>T : T
|
||
|
>flags : string
|
||
|
|
||
|
declare function Callbacks<T1, T2>(flags?: string): void;
|
||
|
>Callbacks : { (flags?: string): void; <T>(flags?: string): void; <T1, T2>(flags?: string): void; <T1, T2, T3>(flags?: string): void; }
|
||
|
>T1 : T1
|
||
|
>T2 : T2
|
||
|
>flags : string
|
||
|
|
||
|
declare function Callbacks<T1, T2, T3>(flags?: string): void;
|
||
|
>Callbacks : { (flags?: string): void; <T>(flags?: string): void; <T1, T2>(flags?: string): void; <T1, T2, T3>(flags?: string): void; }
|
||
|
>T1 : T1
|
||
|
>T2 : T2
|
||
|
>T3 : T3
|
||
|
>flags : string
|
||
|
|
||
|
Callbacks<number, string, boolean>('s'); // no error
|
||
|
>Callbacks<number, string, boolean>('s') : void
|
||
|
>Callbacks : { (flags?: string): void; <T>(flags?: string): void; <T1, T2>(flags?: string): void; <T1, T2, T3>(flags?: string): void; }
|
||
|
|
||
|
new Callbacks<number, string, boolean>('s'); // no error
|
||
|
>new Callbacks<number, string, boolean>('s') : any
|
||
|
>Callbacks : { (flags?: string): void; <T>(flags?: string): void; <T1, T2>(flags?: string): void; <T1, T2, T3>(flags?: string): void; }
|
||
|
|