TypeScript/tests/baselines/reference/contextuallyTypedGenericAssignment.js
Wesley Wigham bbad560912
Refrain from attempting to perform parameter fixing on a generic signature multiple times (#43835)
* Refrain from attempting to perform parameter fixing on a generic signature multiple times

* Remove assertion
2021-04-27 10:49:27 -07:00

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; });