#import <Streams/ReadableStream.idl>
#import <Streams/ReadableStreamDefaultReader.idl>
#import <Streams/ReadableStreamGenericReader.idl>

// https://streams.spec.whatwg.org/#readablestreambyobreader
[Exposed=*]
interface ReadableStreamBYOBReader {
    constructor(ReadableStream stream);

    Promise<ReadableStreamReadResult> read(ArrayBufferView view, optional ReadableStreamBYOBReaderReadOptions options = {});

    undefined releaseLock();
};
ReadableStreamBYOBReader includes ReadableStreamGenericReader;

dictionary ReadableStreamBYOBReaderReadOptions {
    [EnforceRange] unsigned long long min = 1;
};
