/**
 * File locking utility for preventing race conditions
 *
 * Uses advisory locks with timeout and retry logic
 */
export interface LockOptions {
    timeout?: number;
    retryInterval?: number;
    stale?: number;
}
export declare class FileLock {
    private lockPath;
    private acquired;
    private lockId;
    private pendingTimeouts;
    private disposed;
    constructor(filePath: string);
    /**
     * Dispose the file lock and clear any pending timers.
     */
    dispose(): void;
    /**
     * Acquire a lock on the file
     */
    acquire(options?: LockOptions): Promise<boolean>;
    /**
     * Release the lock
     */
    release(): Promise<void>;
    /**
     * Force release (use with caution)
     */
    forceRelease(): Promise<void>;
    /**
     * Check if lock is held
     */
    isLocked(): Promise<boolean>;
    /**
     * Execute a function with lock protection
     */
    withLock<T>(fn: () => Promise<T>, options?: LockOptions): Promise<T | null>;
    private sleep;
}
//# sourceMappingURL=FileLock.d.ts.map