/**
 * File watcher built on @parcel/watcher.
 *
 * Why not chokidar:
 *   - chokidar 4.x dropped fsevents support entirely. On macOS that pushed
 *     the watcher onto Node's fs.watch fallback, which on this platform
 *     allocates one fd per directory. Indexing several CMS-style repos
 *     (~1000+ subdirs each) drove the system file table to ENFILE.
 *   - chokidar 3.x is a workaround (deps rollback, locks us out of upstream
 *     fixes) — not a real solution.
 *
 * @parcel/watcher uses native, recursive backends:
 *   macOS  → FSEvents (1 stream per recursive root, fd-cheap)
 *   Linux  → inotify  (1 watcher per root)
 *   Win    → ReadDirectoryChangesW (1 handle per root)
 *
 * The exported API (`startWatcher`, `stopWatcher`, `FSWatcher`) keeps the
 * same shape callers already use — only `startWatcher` is now async because
 * `parcelWatcher.subscribe()` returns a Promise.
 */
import * as parcelWatcher from "@parcel/watcher";
/**
 * Re-exported under the historical name so call sites keep working unchanged.
 * Underneath this is a `parcelWatcher.AsyncSubscription`.
 */
export type FSWatcher = parcelWatcher.AsyncSubscription;
/**
 * Subscribe to file changes under `repoRoot`. Calls `onChange` with the
 * relative file path on create/update events (debounced 500ms per file)
 * and `onDelete` immediately on delete events.
 *
 * Returns the underlying subscription so the caller can later pass it to
 * `stopWatcher`.
 */
export declare function startWatcher(repoRoot: string, onChange: (filePath: string) => void, onDelete?: (filePath: string) => void): Promise<FSWatcher>;
/**
 * Stop a file watcher and clean up all debounce timers.
 */
export declare function stopWatcher(watcher: FSWatcher): Promise<void>;
//# sourceMappingURL=watcher.d.ts.map