Type Parameters

  • T

Hierarchy

  • ReadableStream<T>
    • IterableReadableStream

Implements

Constructors

  • Type Parameters

    • T

    Parameters

    • underlyingSource: UnderlyingDefaultSource<T>
    • Optionalstrategy: QueuingStrategy<T>

    Returns IterableReadableStream<T>

  • Type Parameters

    • T

    Parameters

    • OptionalunderlyingSource: UnderlyingSource<T>
    • Optionalstrategy: QueuingStrategy<T>

    Returns IterableReadableStream<T>

Properties

locked: boolean
reader: ReadableStreamDefaultReader<T>

Methods

  • Parameters

    • Optionalreason: any

    Returns Promise<void>

  • Parameters

    • options: {
          mode: "byob";
      }
      • mode: "byob"

    Returns ReadableStreamBYOBReader

  • Returns ReadableStreamDefaultReader<T>

  • Parameters

    • Optionaloptions: ReadableStreamGetReaderOptions

    Returns ReadableStreamReader<T>

  • Type Parameters

    • T

    Parameters

    • transform: ReadableWritablePair<T, T>
    • Optionaloptions: StreamPipeOptions

    Returns ReadableStream<T>

  • Parameters

    • destination: WritableStream<T>
    • Optionaloptions: StreamPipeOptions

    Returns Promise<void>

  • Returns [ReadableStream<T>, ReadableStream<T>]

  • Asynchronously iterates over the chunks in the stream's internal queue.

    Asynchronously iterating over the stream will lock it, preventing any other consumer from acquiring a reader. The lock will be released if the async iterator's ReadableStreamAsyncIterator.return | return() method is called, e.g. by breaking out of the loop.

    By default, calling the async iterator's ReadableStreamAsyncIterator.return | return() method will also cancel the stream. To prevent this, use the stream's ReadableStream.values | values() method, passing true for the preventCancel option.

    Parameters

    • Optionaloptions: ReadableStreamIteratorOptions

    Returns ReadableStreamAsyncIterator<T>