ReadableStream
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.
interface ReadableStream <R = any> {
readonly locked: boolean;
[[Symbol.asyncIterator]](options?: {
preventCancel?: boolean;
}): AsyncIterableIterator<R>;cancel(reason?: any): Promise<void>;
getReader(): ReadableStreamDefaultReader<R>;
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
tee(): [ReadableStream<R>, ReadableStream<R>];
}var ReadableStream: {
prototype: ReadableStream;
new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
};§Methods
§
getReader(): ReadableStreamDefaultReader<R>
[src]§
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>
[src]§
tee(): [ReadableStream<R>, ReadableStream<R>]
[src]