/** Deterministic filesystem interleavings for unit tests; never set in runtime code. */ export interface FileLockTestHooks { afterPinnedHolderFirstStat?: (path: string) => void | Promise; afterPinnedHolderFirstStatSync?: (path: string) => void; beforeStaleClaimOwnerPublish?: (ownerPath: string) => void | Promise; beforeStaleClaimOwnerPublishSync?: (ownerPath: string) => void; beforeStalePublicLockUnlink?: (lockPath: string) => void | Promise; beforeStalePublicLockUnlinkSync?: (lockPath: string) => void; } export declare function __testOnly_setFileLockHooks(hooks?: FileLockTestHooks): void; export interface FileLockOptions { /** Max time to wait for the lock before throwing (default MAX_WAIT_MS). */ maxWaitMs?: number; /** Min lock age before a dead-PID lock is stale-breakable (default MIN_STALE_AGE_MS). */ minStaleAgeMs?: number; } export declare function withFileLock(targetPath: string, fn: () => Promise, opts?: FileLockOptions): Promise; export declare function withFileLockSync(targetPath: string, fn: () => T, opts?: FileLockOptions): T; //# sourceMappingURL=file-lock.d.ts.map