Using generic argument that extends something, stops inferring super keys when Exclude is used in addition to keyof and Pick #27928
Labels
Domain: Conditional Types
The issue relates to conditional types
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
Suggestion
An idea for TypeScript
TypeScript Version: 3.1.0
Search Terms:
keyof extends pick exclude
Code
Expected behavior:
Both alpha and beta should work.
Actual behavior:
Alpha does not work: ` Argument of type '"base2"' is not assignable to parameter of type 'Exclude<keyof T, "base1">'.
Playground Link:
Playground link
Related Issues:
The text was updated successfully, but these errors were encountered: