Static methods

staticfrom(iterable:Any):ReadableStream

Creates a ReadableStream from an iterable or async iterable.

Constructor

new(?underlyingSource:ReadableStreamUnderlyingSource, ?strategy:QueuingStrategy)

Variables

read onlylocked:Bool

Whether a reader is currently locked onto this stream.

Methods

cancel(?reason:Any):Promise<Void>

Cancels the stream, signaling a reason why consumer is no longer interested.

getReader(?options:Any):ReadableStreamDefaultReader

getReader(options:{mode:String}):ReadableStreamBYOBReader

Creates a reader and locks this stream to it.

When options.mode is "byob", returns a ReadableStreamBYOBReader.

pipeThrough(transform:ReadableWritablePair, ?options:StreamPipeOptions):ReadableStream

Pipes this readable stream through a transform stream pair.

pipeTo(destination:WritableStream, ?options:StreamPipeOptions):Promise<Void>

Pipes this readable stream to a writable stream.

tee():Array<ReadableStream>

Tees this readable stream, returning a pair of branching streams.

values(?options:{preventCancel:Null<Bool>}):Any

Async iterator over stream chunks ([Symbol.asyncIterator] / values()). Typed as Any because Haxe lacks a standard async-iterator type in 4.0.5.