Re: [whatwg/streams] Align WritableStream structure with ReadableStream structure (#488)

>    const ts = new TransformStream({
> -    transform(chunk, enqueue, done) {
> +    transform(chunk, done, enqueue) {

Yeah, this is what I should clearly explain. I thought that like streams' controller, it might be good to pass the TransformStream controlling functions at the time of creation so that we allow the implementation to start writing some header that is independent from what will be written to the writable side. Then, we'll introduce start(). start() would take function to enqueue(), close() and error(). They don't need to be given to each of transform() and flush() but passed just as a shortcut. But, chunk and done() are specific to each transform() call. So, I thought it would be good to regroup them like this.


---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/pull/488/files/78da22f4ee481cce7a57cd438c0d01770fd6bdf2#r72942098

Received on Monday, 1 August 2016 08:44:26 UTC