#import #import #import // https://streams.spec.whatwg.org/#enumdef-readablestreamreadermode enum ReadableStreamReaderMode { "byob" }; // https://streams.spec.whatwg.org/#dictdef-readablestreamgetreaderoptions dictionary ReadableStreamGetReaderOptions { ReadableStreamReaderMode mode; }; // https://streams.spec.whatwg.org/#readablestream [Exposed=*, Transferable] interface ReadableStream { constructor(optional object underlyingSource, optional QueuingStrategy strategy = {}); // FIXME: static ReadableStream from(any asyncIterable); readonly attribute boolean locked; Promise cancel(optional any reason); ReadableStreamReader getReader(optional ReadableStreamGetReaderOptions options = {}); // FIXME: ReadableStream pipeThrough(ReadableWritablePair transform, optional StreamPipeOptions options = {}); // FIXME: Promise pipeTo(WritableStream destination, optional StreamPipeOptions options = {}); sequence tee(); // FIXME: async iterable(optional ReadableStreamIteratorOptions options = {}); }; typedef (ReadableStreamDefaultReader or ReadableStreamBYOBReader) ReadableStreamReader;