Regression in distributing on conditional types with T extends T
after updating to 5.4
#57736
Labels
Bug
A bug in TypeScript
Fix Available
A PR has been opened for this issue
Recent Regression
This is a new regression just found in the last major/minor version of TypeScript.
π Search Terms
"conditional", "distributive", "distribution"
π Version & Regression Information
β― Playground Link
https://tsplay.dev/w1GDym
π» Code
π Actual behavior
The value of the generic param collapses to never when an additional conditional is added after the distributive conditional.
The error happens only when distributing with
T extends T
.T extends any
,T extends unknown
,T extends infer U
works fine.π Expected behavior
That the distributive type works similarly to the previous versions.
Additional information about the issue
No response
The text was updated successfully, but these errors were encountered: