google / google/closure-compiler
Update Iterator and related classes to have 3 template parameters
Open
internal-issue-created
- Dominant language
- JavaScript
- Stars
- 7.7k
- Forks
- 1.2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 6
Description
Currently `Iterator` and related types have only a single template parameter, which is interpreted as both the type yielded and the final return type.
This has never really been sufficient, because the return type is allowed to be different from the yielded type for a generator, and also you can pass values to the `next()` method that then end up as the result of the `yield` expression inside the generator, and it would be better if we type checked those also.
Contributor guide
Assessment
This issue has not been assessed yet.