33 lines
1.5 KiB
Text
33 lines
1.5 KiB
Text
=== 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; }
|
|
>'s' : string
|
|
|
|
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; }
|
|
>'s' : string
|
|
|