The abort method signals that the producer can no longer successfully write to the stream and it should be immediately moved to an "errored" state, with any queued-up writes discarded.
The abort method signals that the producer can no longer successfully write to the stream and it should be immediately moved to an "errored" state, with any queued-up writes discarded. This will also execute any abort mechanism of the underlying sink. see ¶4.2.4.4. abort(reason)
spec specifies Any (!?)
The close method signals that the producer is done writing chunks to the stream and wishes to move the stream to a "closed" state.
The close method signals that the producer is done writing chunks to the stream and wishes to move the stream to a "closed" state. This queues an action to close the stream, such that once any currently queued-up writes complete, the close mechanism of the underlying sink will execute, releasing any held resources. In the meantime, the stream will be in a "closing" state.
a promise of this stream being closed
The closed getter returns a promise that will be fulfilled when the stream becomes closed, or rejected if it ever errors.
The closed getter returns a promise that will be fulfilled when the stream becomes closed, or rejected if it ever errors. see ¶4.2.4.1. get closed
The ready getter returns a promise that will be fulfilled when the stream transitions away from the "waiting" state to any other state.
The ready getter returns a promise that will be fulfilled when the stream transitions away from the "waiting" state to any other state. Once the stream transitions back to "waiting", the getter will return a new promise that stays pending until the next state transition. In essence, this promise gives a signal as to when any backpressure has let up (or that the stream has been closed or errored).
see ¶4.2.4.2. get ready of whatwg streams spec.
The state getter returns the state of the stream see ¶4.2.4.3. get state of whatwg streams spec
The write method adds a write to the stream’s internal queue, instructing the stream to write the given chunk of data to the underlying sink once all other pending writes have finished successfully .
The write method adds a write to the stream’s internal queue, instructing the stream to write the given chunk of data to the underlying sink once all other pending writes have finished successfully . It returns a promise that will be fulfilled or rejected depending on the success or failure of writing the chunk to the underlying sink. The impact of enqueuing this chunk will be immediately reflected in the stream’s state property; in particular, if the internal queue is now full according to the stream’s queuing strategy, the stream will exert backpressure by changing its state to "waiting".
see 4.2.4.6. write(chunk) of whatwg streams spec
bblfish: not sure what the type of the promise returned is
¶4.2. Class WritableStream of whatwg Stream spec
todo: the constructor
Type of the Chunks to be written to the Stream