import { type TimeSlot } from '@tmlmobilidade/dates';
interface RunOnIntervalOptions {
    /**
     * Interval in milliseconds between the end of one invocation
     * and the start of the next. The first invocation happens immediately.
     * @required
     */
    intervalMs: number | TimeSlot;
    /**
     * Whether to throw errors after logging them.
     * If true, errors are logged and then re-thrown, stopping code execution.
     * @default false
     */
    throwOnError?: boolean;
}
/**
 * Runs an asynchronous function at regular intervals, ensuring that each invocation
 * completes before the next one starts. Errors are logged and can optionally be re-thrown.
 */
export declare function runOnInterval(fn: () => Promise<void>, options: RunOnIntervalOptions): Promise<void>;
export {};
