A default reader vended by a ReadableStream.
Returns a promise that will be fulfilled when the stream becomes closed, or rejected if the stream ever errors or the reader's lock is released before the stream finishes closing.
If the reader is active, behaves the same as stream.cancel(reason).
Returns a promise that allows access to the next chunk from the stream's internal queue, if available.
If reading a chunk causes the queue to become empty, more data will be pulled from the underlying source.
Releases the reader's lock on the corresponding stream. After the lock is released, the reader is no longer active. If the associated stream is errored when the lock is released, the reader will appear errored in the same way from now on; otherwise, the reader will appear closed.
A reader's lock cannot be released while it still has a pending read request, i.e., if a promise returned by
the reader's read() method has not yet been settled. Attempting to
do so will throw a
TypeError and leave the reader locked to the stream.
Generated using TypeDoc