Open saschanaz opened 1 year ago
That's an interesting observation. I can justify it after-the-fact by saying that a writeAlgorithm should always return a promise in order to correctly support backpressure. On the other hand, none of the platform transforms I've defined return an unsettled promise.
Probably there is simply no need to wrap it? If there are two or more standards that always return a settled promise then it might we worth doing so that they could be more concise.
Currently it wraps all others except the write one:
https://streams.spec.whatwg.org/#writablestream-set-up
Perhaps because writeAlgorithm is required here and others are optional, but then TransformStream does wrap the transform algorithm.
https://streams.spec.whatwg.org/#transformstream-set-up
Should WritableStream do the same?