export type SimulateProgressOptions = { /** * How long do we expect the operation to take normally? * Will be used to calculate the step size. * @default 1000 */ expectedDurationMs?: number; /** * How often should we update the progress? * @default 100 */ intervalMs?: number; }; export type ProgressHandler = (progress: number, uncapped: number) => void; export default function simulateProgress(promise: Promise, onProgress: ProgressHandler, { expectedDurationMs, intervalMs }?: SimulateProgressOptions): Promise; /** * Scale the progress towards a target progress. */ export declare function towards(targetProgress: number, callback: ProgressHandler): ProgressHandler; /** * Create a progress handler that grows endlessly * using a dampened hyperbolic curve to slow down. */ export declare function endless(callback: ProgressHandler): ProgressHandler; /** * Dampened hyperbolic function. * * @see https://www.desmos.com/calculator/irwmspbofr * @returns */ export declare function dampenedHyperbolic(x: number): number;