import type { JSONObject } from 'tiny-types';
import type { Clock } from './Clock.js';
import type { DelayedCallback } from './DelayedCallback.js';
import { Duration } from './Duration.js';
import type { RepeatUntilLimits } from './RepeatUntilLimits.js';
/**
 * @group Time
 */
export declare class Scheduler {
    private readonly clock;
    private readonly interactionTimeout;
    private scheduledOperations;
    /**
     * @param clock
     * @param interactionTimeout
     *  The maximum amount of time to give to a callback to complete before throwing an error
     */
    constructor(clock: Clock, interactionTimeout: Duration);
    toJSON(): JSONObject;
    /**
     * Schedules a callback function to be invoked after a delay
     *
     * @param delay
     * @param callback
     */
    after<Result>(delay: Duration, callback: DelayedCallback<Result>): Promise<Result>;
    /**
     * Returns a `Promise` to be resolved after a `delay`
     *
     * @param delay
     */
    waitFor(delay: Duration): Promise<void>;
    /**
     * Schedules a callback function to be repeated, according to configured limits.
     *
     * @param callback
     * @param limits
     */
    repeatUntil<Result>(callback: DelayedCallback<Result>, limits?: RepeatUntilLimits<Result>): Promise<Result>;
    stop(): void;
}
//# sourceMappingURL=Scheduler.d.ts.map