Interface ReadableStream<R>

This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object.

MDN Reference

interface ReadableStream<R> {
    locked: boolean;
    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>];
}

Type Parameters

  • R = any

Properties

locked: boolean

Methods

  • Parameters

    • Optional reason: any

    Returns Promise<void>

Generated using TypeDoc