Type alias recursion is resolved eagerly when the alias is generic and its arguments are derived from inferred members of conditional types #37801
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
feature-request
A request for a new feature
Fix Available
A PR has been opened for this issue
In Discussion
Not yet reached consensus
Milestone
TypeScript Version: 3.9.0-beta
Search Terms: recursive, recursive generic
Code
Note: the usual workaround of an immediately-indexed intermediate object type still works.
Expected behavior: It to type check without warnings
Actual behavior:
Type alias 'Intersect' circularly references itself. (2456)
Type 'Intersect' is not generic. (2315)
Type 'Intersect' is not generic. (2315)
Playground Link: Link
Related Issues:
SomeTuple[number]
won't work because I don't want to recurse.The text was updated successfully, but these errors were encountered: