UNPKG

stromjs

Version:

Dependency-free streams utils for Node.js

10 lines (9 loc) 538 B
/// <reference types="node" /> import { Transform, TransformOptions } from "stream"; export declare enum FlushStrategy { rolling = "rolling", sliding = "sliding" } export type AccumulatorByIteratee<T> = (event: T, bufferChunk: T) => boolean; export declare function accumulator(flushStrategy: FlushStrategy, batchSize: number, keyBy?: string, options?: TransformOptions): Transform; export declare function accumulatorBy<T>(flushStrategy: FlushStrategy, iteratee: AccumulatorByIteratee<T>, options?: TransformOptions): Transform;