NodeJS Stream Meeting Notes - Async Iterators #74
Description
Hey,
Node discussed Symbol.asyncIterator
streams in the last WG meeting yesterday (I had to miss it at the last minute :( ).
Symbol.asyncIterator can be supported inside streams without internal changes, however merging it inside core depends on what is the adopted change for Promises in core. We are happy to maintain the prototype and expand if needed. We should take care on what is the story for writing to streams, as it should match somehow the story for reading, i.e. we should be able to write with promises as well.
One issue raised was how to make async iterators work with writable streams - that is, there needs to be a way to do:
async function* foo() {
yield 1;
yield 2;
yield 3;
}
And have that coerced into a NodeJS stream - I don't think it should be too problematic to do in Node and I'm excited that the streams WG is keeping a prototype for interop. Pinging @mcollina who attended the meeting.