Allow generic yield* types #41646
Labels
Effort: Moderate
Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
Help Wanted
You can do this
Rescheduled
This issue was previously scheduled to an earlier milestone
Suggestion
An idea for TypeScript
Milestone
Search Terms
generic yield asterisk type preserve
Suggestion
Currently, the
yield*
construct doesn't work properly with generic types. I would like to see these kinds of situations get proper types:I would like to see some kind of
Iteratorify
types added:However, this still won't work for generic
this
parameters inSymbol.iterator
calls:For this, we would need #37181 (and we would need a way to allow for passing in implicit
this
parameters in that proposal)Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: