///
///
import { EventEmitter } from 'node:events';
import { TargetEvent } from './enums.js';
import WatcherHandler from './watcher_handler.js';
import WatcherLocker from './watcher_locker.js';
import WatcherPoller from './watcher_poller.js';
import type { Callback, Disposer, Handler, Ignore, Path, PollerConfig, SubwatcherConfig, WatcherOptions, WatcherConfig } from './types.js';
declare class Watcher extends EventEmitter {
_closed: boolean;
_ready: boolean;
_closeAborter: AbortController;
_closeSignal: {
aborted: boolean;
};
_closeWait: Promise;
_readyWait: Promise;
_locker: WatcherLocker;
_roots: Set;
_poller: WatcherPoller;
_pollers: Set;
_subwatchers: Set;
_watchers: Record;
_watchersLock: Promise;
_watchersRestorable: Record;
_watchersRestoreTimeout?: NodeJS.Timeout;
constructor(target?: Path[] | Path | Handler, options?: WatcherOptions | Handler, handler?: Handler);
isClosed(): boolean;
isIgnored(targetPath: Path, ignore?: Ignore): boolean;
isReady(): boolean;
close(): boolean;
error(exception: unknown): boolean;
event(event: TargetEvent, targetPath: Path, targetPathNext?: Path): boolean;
ready(): boolean;
pollerExists(targetPath: Path, options: WatcherOptions): boolean;
subwatcherExists(targetPath: Path, options: WatcherOptions): boolean;
watchersClose(folderPath?: Path, filePath?: Path, recursive?: boolean): void;
watchersLock(callback: Callback): Promise;
watchersRestore(): void;
watcherAdd(config: WatcherConfig, baseWatcherHandler?: WatcherHandler): Promise;
watcherClose(config: WatcherConfig): void;
watcherExists(folderPath: Path, options: WatcherOptions, handler: Handler, filePath?: Path): boolean;
watchDirectories(foldersPaths: Path[], options: WatcherOptions, handler: Handler, filePath?: Path, baseWatcherHandler?: WatcherHandler): Promise;
watchDirectory(folderPath: Path, options: WatcherOptions, handler: Handler, filePath?: Path, baseWatcherHandler?: WatcherHandler): Promise;
watchFileOnce(filePath: Path, options: WatcherOptions, callback: Callback): Promise;
watchFile(filePath: Path, options: WatcherOptions, handler: Handler): Promise;
watchPollingOnce(targetPath: Path, options: WatcherOptions, callback: Callback): Promise;
watchPolling(targetPath: Path, options: WatcherOptions, callback: Callback): Promise;
watchUnknownChild(targetPath: Path, options: WatcherOptions, handler: Handler): Promise;
watchUnknownTarget(targetPath: Path, options: WatcherOptions, handler: Handler): Promise;
watchPaths(targetPaths: Path[], options: WatcherOptions, handler: Handler): Promise;
watchPath(targetPath: Path, options: WatcherOptions, handler: Handler): Promise;
watch(target?: Path[] | Path | Handler, options?: WatcherOptions | Handler, handler?: Handler): Promise;
}
export default Watcher;