[streams] type of Chunk.value (#410)

Hi,

how is one meant to know what the value of a chunk is going to be? Does that depend on the function that returns chunks? The specification says in [ΒΆ 2. Model](https://streams.spec.whatwg.org/#model):

> A chunk is a single piece of data that is written to or read from a stream. It can be of any type; streams can even contain chunks of different types. A chunk will often not be the most atomic unit of data for a given stream; for example a byte stream might contain chunks consisting of 16 KiB `Uint8Arrays`, instead of single bytes.

By printing out the value I seem to have at one point found that it was an Array of bytes, at another time a [Uint8Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array) which is a form of [TypedArray](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/prototype).


---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/streams/issues/410

Received on Wednesday, 2 December 2015 15:25:44 UTC