Skip to content

Generic gets lost in 3.8.2 #37110

Closed
@mikearnaldi

Description

@mikearnaldi
const f = <F extends (...args: any[]) => <G>(x: G) => void>(_: F): F => _

const a = f(<K extends string>(_: K) => _ => ({}))

/*
in 3.8.2

(_: K) => <G>(_: G) => {};
*/

/*
in 3.7.5

<K extends string>(_: K) => <G>(_: G) => {};
*/

Expected behavior:
To be like in 3.7.5

Actual behavior:
K is lost

Buggy:
Playground Link

Working:
Playground Link

Note:
reproduce on next too

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions