Interface ReadableStream<R>

This Streams API interface represents a readable stream of byte data.

interface ReadableStream<R> {
    locked: boolean;
    [asyncIterator](): AsyncIterableIterator<R>;
    cancel(reason?): Promise<void>;
    getReader(): ReadableStreamDefaultReader<R>;
    getReader(options): ReadableStreamBYOBReader;
    pipeThrough<T>(transform, options?): ReadableStream<T>;
    pipeTo(destination, options?): Promise<void>;
    tee(): [ReadableStream<R>, ReadableStream<R>];
    values(options?): AsyncIterableIterator<R>;
}

Type Parameters

  • R = any

Properties

locked: boolean

Methods

  • Parameters

    • Optional reason: any

    Returns Promise<void>

  • Parameters

    • Optional options: {
          preventCancel?: boolean;
      }
      • Optional preventCancel?: boolean

    Returns AsyncIterableIterator<R>

Generated using TypeDoc