Closed
Description
π Search Terms
unbound generic, unbound type parameter
π Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ.
β― Playground Link
π» Code
declare function wrap<X>(x: X): { x: X }
declare function call<A extends any[], T>(x: { x: (...args: A) => T }, ...args: A): T
const leak = call(wrap(<T>(x: T) => x), 1)
// ^? - const leak: A[0]
π Actual behavior
The type of leak
involves an unbound type parameter.
π Expected behavior
The type of leak
should be number
.
Additional information about the issue
No response