-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
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
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue