Re: [whatwg/streams] ReadableStream.from(asyncIterable) (#1083)

@domenic commented on this pull request.



> @@ -787,6 +796,19 @@ option. If {{UnderlyingSource/type}} is set to undefined (including via omission
      |underlyingSource|, |underlyingSourceDict|, |highWaterMark|, |sizeAlgorithm|).
 </div>
 
+<div algorithm>
+ The static <dfn id="rs-from" method for="ReadableStream">from(|asyncIterable|)</dfn> method steps
+ are:
+
+ 1. Return ? [$ReadableStreamFromIterable$](|asyncIterable|).
+</div>
+
+<div algorithm>
+ The static <dfn id="rs-of" method for="ReadableStream">of(...|chunks|)</dfn> method steps are:
+
+ 1. Return ? [$ReadableStreamFromIterable$](|chunks|).

This doesn't really work, as |chunks| is an Infra list of `any` values, not a JS array. A separate abstract op is probably best.

But personally, I'm not sure it's worth adding `of()` vs. just `from([])`. I rarely see people use `Array.of()`.

-- 
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/1083#pullrequestreview-534922920

Received on Thursday, 19 November 2020 22:52:23 UTC