• Public
  • Public/Protected
  • All

Interface UnderlyingSource<R>

An underlying source for constructing a ReadableStream.

Type parameters

  • R = any


  • UnderlyingSource



Optional cancel

A function that is called whenever the consumer cancels the stream, via stream.cancel(), defaultReader.cancel(), or byobReader.cancel(). It takes as its argument the same value as was passed to those methods by the consumer.

Optional pull

A function that is called whenever the stream’s internal queue of chunks becomes not full, i.e. whenever the queue’s desired size becomes positive. Generally, it will be called repeatedly until the queue reaches its high water mark (i.e. until the desired size becomes non-positive).

Optional start

A function that is called immediately during creation of the ReadableStream.

Optional type

type?: undefined

Generated using TypeDoc