TypeScript 4.1+: Generic binding too broad in recursive conditional types #41380
Labels
Needs Investigation
This issue needs a team member to investigate its status.
Milestone
TypeScript Version: 4.2.0-dev.20201103
Search Terms: Recursive Conditional types, generics, tuple types
Code
Expected behavior:
Keys
gets bound to the value type passed as an argument to the function. This value type is then used for CheckArgumentsActual behavior:
Keys
is the entire union typeArguments<Obj>
, not the subset. This leads toCheckArguments
returning a too broad return type (and taking very long to evaluate ;-))Playground Link: Click here
Related Issues: Did not find any.
The text was updated successfully, but these errors were encountered: