export interface TimerStartOptions { /** Invokes a timer callback immediately and starts the timer. */ readonly immediately?: boolean | undefined; /** Stops after a timer callback is invoked. */ readonly once?: boolean | undefined; } interface TimerStopOptions { /** If there is a pending invocation of the callback function, invoke it immediately. */ readonly flush?: boolean; } export interface Timer { /** @deprecated Use isActive(). */ readonly active: boolean; readonly isActive: () => boolean; readonly start: (options?: TimerStartOptions) => void; readonly stop: (options?: TimerStopOptions) => void; readonly pause: VoidFunction; readonly getState: () => 'active' | 'stopped' | 'paused'; } interface Options { readonly callback: ((timer: Timer) => void) | ((timer: Timer) => Promise); /** - function - can be used as a dynamically changing timer interval (evaluated at each timer tick). */ readonly interval: number | (() => number); /** Defaults to `true`. */ readonly autostart?: boolean | undefined; /** Used only if `interval` is a function and callback returns `Promise`. */ readonly waitCallback?: boolean | undefined; readonly onStart?: VoidFunction | undefined; readonly onStop?: VoidFunction | undefined; readonly onPause?: VoidFunction | undefined; } export declare function getTimer({ callback, interval, onStart, onStop, onPause, autostart, waitCallback, }: Options): Timer; export {};