import type { Curried } from '../compositions/curry.js'; import type { Series } from './types.js'; declare function _buffer(input: Series, options: { /** Number of items buffered. */ size: number; /** * - `'frfo'` (default) : first resolved will be first output. * - `'fifo'` : first input will be first output. */ mode?: 'frfo' | 'fifo'; }): AsyncGenerator>; /** * Buffers specified number of items and generates results in the resolution order. * * If the input is a synchronous iterator which generates promises, the promises are executed in parallel and throttled. */ export declare function buffer(...args: Parameters>): ReturnType>; export declare function buffer(...args: Parameters>>): ReturnType>>; /** * The promises generated by the given synchronous iterator are executed in parallel and throttled. * Alias of {@link buffer}. * * @example * ```ts * const responses = await Rt.pipe( * urls, * Rt.map.sync(async url => { * const response = await fetch(url); * return await response.json(); * }), * Rt.throttle({ size: 5 }), // Maintain up to 5 concurrent HTTP fetch requests. * Rt.accumulate.async, // The results are in resolution order. * ); * ``` */ export declare const throttle: typeof buffer; /** * The promises generated by the given synchronous iterator are executed in parallel and kept in defined concurrency level. * Alias of {@link buffer}. * * @example * ```ts * const responses = await Rt.pipe( * urls, * Rt.map.sync(async url => { * const response = await fetch(url); * return await response.json(); * }), * Rt.concurrency({ size: 5 }), // Maintain up to 5 concurrent HTTP fetch requests. * Rt.accumulate.async, // The results are in resolution order. * ); * ``` */ export declare const concurrency: typeof buffer; export {}; //# sourceMappingURL=buffer.d.ts.map