Closed
Description
TypeScript Version: 2.3.4
Code
// error, defined as ???
type Method<A extends Array<any>, R = void> = (...args: A) => R;
// this is still passed
const foo: Method<[number, string], string> = (a: string, b: number) => a + b;
// ^^^^^^ ^^^^^^ ^ ^
Expected behavior:
pass validation
Actual behavior:
Error:(1, 47) TS2370:A rest parameter must be of an array type.
Metadata
Metadata
Assignees
Labels
No labels