import { Loggable, type ILogger } from '../logger/index.js'; import { Getter } from '../types/getter.js'; /** Runs a callback after a timeout, ignoring all consecutive calls until the first is processed. */ export declare class DebounceAction extends Loggable { timeout: number; private _timeoutRef; private _postponedCb; private _locked; /** * In case previous action has started processing but not finished yet, and the following one is going to start, * this flag allows to run the second in parallel. */ private _allowParallelRuns; private _currentRun; constructor(timeout?: number); useParallelRuns(): this; clear(): void; tryRun(cb: () => T | Promise, restartTimeout?: boolean): Promise; forceRun: () => Promise; getPromise(): Promise; } type ProcessorResult = { result: T | undefined; index: number; }; export declare class DebounceProcessor { private readonly process; private readonly _queue; private readonly _action; private _promise; constructor(process: (objs: TSubject[]) => Promise, timeout?: number); setLogger(logger: Getter): this; push(data: TSubject): Promise>; private _process; clear(): void; } export {};