@push.rocks/lik
Version:
Provides a collection of lightweight helpers and utilities for Node.js projects.
13 lines (12 loc) • 406 B
TypeScript
export interface ITimedAggregatorOptions<T> {
aggregationIntervalInMillis: number;
functionForAggregation: (input: T[]) => void;
}
export declare class TimedAggregtor<T> {
options: ITimedAggregatorOptions<T>;
private storageArray;
constructor(optionsArg: ITimedAggregatorOptions<T>);
private aggregationTimer;
private checkAggregationStatus;
add(aggregationArg: T): void;
}