mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
19 lines
773 B
Plaintext
19 lines
773 B
Plaintext
genericRestArityStrict.ts(7,1): error TS2554: Expected 3 arguments, but got 1.
|
|
genericRestArityStrict.ts(8,45): error TS2554: Expected 3 arguments, but got 8.
|
|
|
|
|
|
==== genericRestArityStrict.ts (2 errors) ====
|
|
// Repro from #25559
|
|
|
|
declare function call<TS extends unknown[]>(
|
|
handler: (...args: TS) => void,
|
|
...args: TS): void;
|
|
|
|
call((x: number, y: number) => x + y);
|
|
~~~~
|
|
!!! error TS2554: Expected 3 arguments, but got 1.
|
|
!!! related TS6236 genericRestArityStrict.ts:5:5: Arguments for the rest parameter 'args' were not provided.
|
|
call((x: number, y: number) => x + y, 1, 2, 3, 4, 5, 6, 7);
|
|
~~~~~~~~~~~~~
|
|
!!! error TS2554: Expected 3 arguments, but got 8.
|
|
|