bbad560912
* Refrain from attempting to perform parameter fixing on a generic signature multiple times * Remove assertion
11 lines
285 B
TypeScript
11 lines
285 B
TypeScript
//// [contextuallyTypedGenericAssignment.ts]
|
|
function foo<A extends any[]>(
|
|
arg: <T extends { a: number }>(t: T, ...rest: A) => number
|
|
) { }
|
|
|
|
foo((t, u: number) => t.a)
|
|
|
|
//// [contextuallyTypedGenericAssignment.js]
|
|
function foo(arg) { }
|
|
foo(function (t, u) { return t.a; });
|