UNPKG

@johngw/stream

Version:

Reactive programming tools using the WHATWG Streams API.

23 lines 788 B
import type { UnderlyingDefaultSource } from 'node:stream/web'; /** * A collection of `UnderlyingDefaultSource`s that implement the `UnderlyingDefaultSource`. * * @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>; } //# sourceMappingURL=SourceComposite.d.ts.map