UNPKG

@johngw/stream

Version:

Reactive programming tools using the WHATWG Streams API.

22 lines (21 loc) 665 B
/** * A collection of `UnderlyingSource`s that implement the `UnderlyingSource`. * * @group Sources * @example * ``` * new ReadableStream( * new SourceComposite([ * { start: (controller) => controller.enqueue('Hello') }, * { start: (controller) => controller.enqueue('World') }, * ]) * ) * ``` */ export declare class SourceComposite<T> implements UnderlyingDefaultSource<T> { #private; constructor(sources: UnderlyingDefaultSource<T>[]); cancel(reason: unknown): Promise<void>; pull(controller: ReadableStreamDefaultController<T>): Promise<void>; start(controller: ReadableStreamDefaultController<T>): Promise<void>; }