π 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
https://www.typescriptlang.org/play?jsx=0#code/CYUwxgNghgTiAEAzArgOzAFwJYHtXwHcYoAHAHgA0A+ACgA8AueCgSiYG95Hn4BfAKFCRYCFOmx54YKBAhkAgvBB0MIVMADO8KKgCeAbQC6AGngAVWt07caAOnuwA5hqbyW8ALxVzfU-dtOLvBuTGb8-GB4GhjwECBQANaeUjIQNESkNGQW9KHuXlwspgCMLPwA9OXw1fAAegD8-EA
π» 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