IterableReadableStreamInterface<T>: {
    [asyncIterator]: ((options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<T>) & (() => AsyncIterator<T, any, undefined>);
    cancel: ((reason?: any) => Promise<void>);
    getReader: {
        (options: {
            mode: "byob";
        }): ReadableStreamBYOBReader;
        (): ReadableStreamDefaultReader<T>;
        (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<T>;
    };
    locked: boolean;
    pipeThrough: (<T>(transform: ReadableWritablePair<T, T>, options?: StreamPipeOptions) => ReadableStream<T>);
    pipeTo: ((destination: WritableStream<T>, options?: StreamPipeOptions) => Promise<void>);
    tee: (() => [ReadableStream<T>, ReadableStream<T>]);
    values: ((options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<T>);
}

Type Parameters

  • T

Type declaration

  • [asyncIterator]: ((options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<T>) & (() => AsyncIterator<T, any, undefined>)
  • cancel: ((reason?: any) => Promise<void>)
      • (reason?): Promise<void>
      • Parameters

        • Optionalreason: any

        Returns Promise<void>

  • getReader: {
        (options: {
            mode: "byob";
        }): ReadableStreamBYOBReader;
        (): ReadableStreamDefaultReader<T>;
        (options?: ReadableStreamGetReaderOptions): ReadableStreamReader<T>;
    }
      • (options): ReadableStreamBYOBReader
      • Parameters

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

        Returns ReadableStreamBYOBReader

      • (): ReadableStreamDefaultReader<T>
      • Returns ReadableStreamDefaultReader<T>

      • (options?): ReadableStreamReader<T>
      • Parameters

        • Optionaloptions: ReadableStreamGetReaderOptions

        Returns ReadableStreamReader<T>

  • locked: boolean
  • pipeThrough: (<T>(transform: ReadableWritablePair<T, T>, options?: StreamPipeOptions) => ReadableStream<T>)
      • <T>(transform, options?): ReadableStream<T>
      • Type Parameters

        • T

        Parameters

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

        Returns ReadableStream<T>

  • pipeTo: ((destination: WritableStream<T>, options?: StreamPipeOptions) => Promise<void>)
      • (destination, options?): Promise<void>
      • Parameters

        • destination: WritableStream<T>
        • Optionaloptions: StreamPipeOptions

        Returns Promise<void>

  • tee: (() => [ReadableStream<T>, ReadableStream<T>])
      • (): [ReadableStream<T>, ReadableStream<T>]
      • Returns [ReadableStream<T>, ReadableStream<T>]

  • values: ((options?: ReadableStreamIteratorOptions) => ReadableStreamAsyncIterator<T>)
      • (options?): ReadableStreamAsyncIterator<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>