UNPKG

@bemedev/rx-add-ons

Version:

A collection of RxJS operators and utilities to enhance reactive programming capabilities.

19 lines 708 B
import { Observable } from 'rxjs'; /** * Groups emissions by time windows. Emits arrays of values collected within each time window. * * @param min - Time window size in milliseconds * @param max - Optional maximum buffer size (defaults to no limit) * @returns A function that returns an Observable that emits arrays of grouped values * * @example * ```typescript * // Group emissions every 1000ms * source$.pipe(groupByTime(1000)) * * // Group emissions every 500ms with max 10 items per group * source$.pipe(groupByTime(500, 10)) * ``` */ export declare function groupByTime<T>(min: number, max?: number): (source: Observable<T>) => Observable<T[]>; //# sourceMappingURL=groupByTime.d.ts.map