UNPKG

@johngw/stream

Version:

Reactive programming tools using the WHATWG Streams API.

19 lines (18 loc) 363 B
/** * Adds a counter representing the amount of chunks * received thus far. * * @group Transformers * @example * ``` * --a----------------------b-------| * * withCounter() * * --{chunk:'a',counter:0}--{chunk:'b',counter:1}-| * ``` */ export declare function withCounter<T>(start?: number): TransformStream<T, { chunk: T; counter: number; }>;