/** * Detaches a timer from the event loop when the runtime supports it (Node), so a * pending acquisition timeout does not keep the process alive by itself. Browsers * and other runtimes return a plain number from setTimeout - nothing to do there. */ export declare function unrefTimer(timer: unknown): void; /** * Counterpart of unrefTimer(): makes a detached timer hold the event loop again. */ export declare function refTimer(timer: unknown): void; /** * Turns a timed out acquisition into null - the "try" flavour of acquire. Any * other failure (cancellation, a destroyed lock, ...) is not "the lock is busy" * and keeps propagating. */ export declare function nullOnTimeout(acquisition: Promise): Promise; export declare function isNil(value: unknown): value is null | undefined; /** * A TTL is backed by a setTimeout, which fires right away for delays above * MAX_TIMER_DELAY_IN_MS - so larger finite values are rejected rather than * silently expiring at once. Infinity is fine: it means "no TTL" and needs no * timer. */ export declare function assertTtl(ttlMs: number): void; //# sourceMappingURL=utils.d.ts.map