With the current async iterator design, syntax-supported iteration should be made async-aware. That is, when executed within an async function, it should await promises for iteration results.
Spread syntax in array literals and argument lists
Destructuring array patterns
For/of statements
Delegating yield (yield *)
GetIterator is also used in various collection types like Array, Map, and Set. I seems like those uses of iteration demand synchronous iterators, however. More thought is needed there.
With the current async iterator design, syntax-supported iteration should be made async-aware. That is, when executed within an async function, it should await promises for iteration results.
yield *
)GetIterator
is also used in various collection types likeArray
,Map
, andSet
. I seems like those uses of iteration demand synchronous iterators, however. More thought is needed there.