Do not conflate IDL ReadableStream and JS ReadableStream implicitly.
Closed this issue · 4 comments
Branched from #50.
We need to distinguish "fetch" (or "IDL") ReadableStream and "JavaScript" ReadableStream, and make their relationship clean.
I think defining operations such as close and enqueue in the infrastructure section and using them from other parts are good for readability and modularity - We can say that we define IDL ReadableStream in the infrastructure section and we can move it to the WebIDL spec or the Streams spec later.
Even if we choose the first option of #50 (comment), handling ReadableStream as an IDL type in main fetch sections would be beneficial.
Yeah, having it in the infrastructure temporarily makes sense.
I guess this makes sense if you prefer saying "enqueue idlChunk into idlReadableStream" instead of using EnqueueReadableStream directly on JS objects. It is probably a good refactoring.
Maybe we should open an issue against IDL for this?