Re: [whatwg/streams] ReadableStreamBYOBReader.prototype.readFully(view) (#1143)

Makes sense to me; thanks for thinking through the design.

> Should we also have a shorthand `ReadableStream.readFully(view)`?

IMO we should only do that if we do #1072.

Even then, I'm not 100% sure, because it only makes sense on byte streams, and so quarantining it into the reader seems a bit nicer from a theoretical purity perspective. (This sort of type mismatch affects a lot of the suggestions in #1019...)

> Would it have the same signature, i.e. returning `Promise<ReadableStreamBYOBReadResult>`?

Seems like it should; any reason to deviate?

-- 
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/issues/1143#issuecomment-878645044

Received on Monday, 12 July 2021 22:41:58 UTC