fix(op_crate/fetch): add back ReadableStream.getIterator and deprecate (#9146)

This commit is contained in:
Kitson Kelly 2021-01-18 10:40:39 +11:00 committed by GitHub
parent 81d73f2987
commit 2077864a8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 1 deletions

View file

@ -150,6 +150,12 @@ declare class ByteLengthQueuingStrategy
interface ReadableStream<R = any> {
readonly locked: boolean;
cancel(reason?: any): Promise<void>;
/**
* @deprecated This is no longer part of the Streams standard and the async
* iterable should be obtained by just using the stream as an
* async iterator.
*/
getIterator(options?: { preventCancel?: boolean }): AsyncIterableIterator<R>;
getReader(): ReadableStreamDefaultReader<R>;
pipeThrough<T>(
{ writable, readable }: {