You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is currently not possible because of how error handling work in streams.
However, wrapping #13506 (stream.pump) in a promise should be simple to do. I think we should work on landing that first, and then adding a promisified version of that too (or util.promisify()).
With async iterators, we can use synchronous-looking code to consume readable streams.
There is no equivalent for writable streams in Node core.
Example use case:
This would resolve when
write
ends or reject if an error occurs.Prior art:
/cc @nodejs/streams @mcollina
The text was updated successfully, but these errors were encountered: