export interface LockOptions { /** * Called on each SOFT_WATCHDOG_MS tick while `fn()` is still running, with the * elapsed time in ms. Use it to push a non-fatal progress heartbeat. Must not * throw — it is invoked inside a try/catch so a bad callback cannot break the * lock, but keep it cheap and side-effect-only. */ onSlow?: (elapsedMs: number) => void; /** Override the hard ceiling (ms). Mainly for tests; defaults to HARD_CEILING_MS. */ hardCeilingMs?: number; /** Override the soft heartbeat interval (ms). Mainly for tests; defaults to SOFT_WATCHDOG_MS. */ softWatchdogMs?: number; } export declare function withLock(key: string, fn: () => Promise, opts?: LockOptions): Promise;