Interface ReadableStream<R>
interface ReadableStream<R> {
locked: boolean;
[asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
cancel(reason?: any): Promise<void>;
getReader(options: {
mode: "byob";
}): ReadableStreamBYOBReader;
getReader(): ReadableStreamDefaultReader<R>;
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
}
locked: boolean;
[asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
cancel(reason?: any): Promise<void>;
getReader(options: {
mode: "byob";
}): ReadableStreamBYOBReader;
getReader(): ReadableStreamDefaultReader<R>;
getReader(options?: ReadableStreamGetReaderOptions): ReadableStreamReader<R>;
pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
tee(): [ReadableStream<R>, ReadableStream<R>];
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
}
Type Parameters
Index
Properties
Methods
Methods
[asyncIterator]
- [async
Iterator] (options?): ReadableStreamAsyncIterator<R> Parameters
Optional
options: ReadableStreamIteratorOptions
Returns ReadableStreamAsyncIterator<R>
cancel
getReader
- get
Reader (options): ReadableStreamBYOBReader Parameters
- options: {
mode: "byob";
}mode: "byob"
Returns ReadableStreamBYOBReader
- options: {
- get
Reader (): ReadableStreamDefaultReader<R> Returns ReadableStreamDefaultReader<R>
- get
Reader (options?): ReadableStreamReader<R> Parameters
Optional
options: ReadableStreamGetReaderOptions
Returns ReadableStreamReader<R>
pipeThrough
- pipe
Through <T>(transform, options?): ReadableStream<T> Type Parameters
Parameters
- transform: ReadableWritablePair<T, R>
Optional
options: StreamPipeOptions
Returns ReadableStream<T>
pipeTo
- pipe
To (destination, options?): Promise<void> Parameters
- destination: WritableStream<R>
Optional
options: StreamPipeOptions
Returns Promise<void>
tee
- tee(): [ReadableStream<R>, ReadableStream<R>]
Returns [ReadableStream<R>, ReadableStream<R>]
values
- values(options?): ReadableStreamAsyncIterator<R>
Parameters
Optional
options: ReadableStreamIteratorOptions
Returns ReadableStreamAsyncIterator<R>
MDN Reference