-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lack of generator return type inference #105
Comments
We do sort of fix this issue with our own typescript compiler plugin. |
Unfortunately, I don't think any of the new features in TypeScript addresses this issue. As far as i can tell, even with the planned improvements the |
@Jomik @paldepind |
All the yield statements will still return |
I read more properly about generators/iterators and I understand better now. In case it helps someone else: it's because in general there is no connection between the Next type and Yield type. Although, microsoft/TypeScript#30790 (comment) |
Just noticed this while looking through the examples. Turns out it's a Typescript limitation which is going to be fixed soon (hopefully):
microsoft/TypeScript#2983
microsoft/TypeScript#30555
Just making an issue for it in anticipation.
The text was updated successfully, but these errors were encountered: