declare const cancelAllIdleTasks: () => void; type ConfigureOptions = { readonly interval?: number; readonly debug?: boolean; } & ConfigurableWaitForIdleTaskOptions; declare const configureIdleTask: (options: ConfigureOptions) => void; type IdleTaskTimeoutStrategy = 'error' | 'forceRun'; interface WaitForIdleTaskOptions { readonly timeout?: number; readonly timeoutStrategy?: IdleTaskTimeoutStrategy; } declare class WaitForIdleTaskTimeoutError extends Error { constructor(); } declare const waitForIdleTask: (key: IdleTaskKey, options?: WaitForIdleTaskOptions) => Promise; type IdleTaskFunction = () => any; type ConfigurableWaitForIdleTaskOptions = Pick; interface IdleTaskKey { readonly id: number; } interface SetIdleTaskOptions { readonly priority?: 'low' | 'high'; readonly revalidateInterval?: number; readonly revalidateWhenExecuted?: boolean; readonly taskName?: string; readonly overwriteTask?: IdleTaskKey; } declare const setIdleTask: (task: IdleTaskFunction, options?: SetIdleTaskOptions) => IdleTaskKey; declare const cancelIdleTask: (key: IdleTaskKey) => void; declare const forceRunIdleTask: (key: IdleTaskKey) => Promise; type IdleTaskStatus = 'ready' | 'executed' | 'unknown'; declare const getIdleTaskStatus: (key: IdleTaskKey) => IdleTaskStatus; type GetResultFromIdleTaskOptions = Pick & ConfigurableWaitForIdleTaskOptions; declare const getResultFromIdleTask: (task: IdleTaskFunction, options?: GetResultFromIdleTaskOptions) => ReturnType; export { type ConfigureOptions, type GetResultFromIdleTaskOptions, type IdleTaskKey, type IdleTaskStatus, type SetIdleTaskOptions, type WaitForIdleTaskOptions, WaitForIdleTaskTimeoutError, cancelAllIdleTasks, cancelIdleTask, configureIdleTask, forceRunIdleTask, getIdleTaskStatus, getResultFromIdleTask, setIdleTask, waitForIdleTask };