13 lines
769 B
Text
13 lines
769 B
Text
|
==== tests/cases/compiler/overloadsAndTypeArgumentArityErrors.ts (3 errors) ====
|
||
|
declare function Callbacks(flags?: string): void;
|
||
|
declare function Callbacks<T>(flags?: string): void;
|
||
|
declare function Callbacks<T1, T2>(flags?: string): void;
|
||
|
|
||
|
Callbacks<number, string, boolean>('s'); // wrong number of type arguments
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
!!! Supplied parameters do not match any signature of call target.
|
||
|
new Callbacks<number, string, boolean>('s'); // wrong number of type arguments
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
!!! Supplied parameters do not match any signature of call target.
|
||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||
|
!!! Only a void function can be called with the 'new' keyword.
|