import { type FSWatcher, type WatchListener } from "node:fs";
export declare const FS_WATCH_RETRY_DELAY_MS = 5000;
export declare const SAFE_FS_WATCH_CANONICALIZATION_FAILED = "ERR_SAFE_FS_WATCH_CANONICALIZATION_FAILED";
export declare const SAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH = "ERR_SAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH";
export type SafeFsWatchErrorCode = typeof SAFE_FS_WATCH_CANONICALIZATION_FAILED | typeof SAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH;
export interface SafeFsWatchPathError extends Error {
    code: SafeFsWatchErrorCode;
    watchedPath: string;
    resolvedPath?: string;
}
export interface NativeWatchPathResult {
    path: string;
}
export interface NativeWatchPathErrorResult {
    error: SafeFsWatchPathError;
}
export type NativeWatchPathResolution = NativeWatchPathResult | NativeWatchPathErrorResult;
export interface SafeFsWatchOptions {
    platform?: NodeJS.Platform;
    realpathSyncNative?: (path: string) => string;
    watch?: (path: string, listener: WatchListener<string>) => FSWatcher;
}
export declare function closeWatcher(watcher: FSWatcher | null | undefined): void;
export declare function isUnsafeWindowsShortPath(path: string, platform?: NodeJS.Platform): boolean;
export declare function isSafeFsWatchPathError(error: unknown): error is SafeFsWatchPathError;
export declare function resolveNativeWatchPath(path: string, options?: SafeFsWatchOptions): NativeWatchPathResolution;
export declare function watchWithErrorHandler(path: string, listener: WatchListener<string>, onError: (error: Error) => void, options?: SafeFsWatchOptions): FSWatcher | null;
//# sourceMappingURL=fs-watch.d.ts.map