Interface ReadableStream<R>

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

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

Type Parameters

  • R = any

Properties

locked: boolean

Methods

  • Parameters

    • Optional reason: any

    Returns Promise<void>