import { EventEmitter } from 'node:events'; type WatchOptions = { ignoreInitial?: boolean; ignored?: (watchedPath: string) => boolean; }; export declare function watch(watchPaths: string[], options: WatchOptions): FileWatcher; /** * The shared generate-on-change loop behind `sqlfu generate --watch`, used by * both the file-backed and inline modes: initial run, debounced events, * coalescing (events arriving mid-generate queue exactly one follow-up run), * and ready/abort/close lifecycle. Generate failures are logged, not fatal — * the watcher keeps running so the next change can recover. */ export declare function watchAndRegenerate(input: { watchPaths: string[]; /** Filter paths out of watching and events (e.g. the generated output dir). */ ignored: ((eventPath: string) => boolean) | null; /** Veto a debounced event, e.g. to skip the generator's own writes. */ shouldRegenerate: ((eventPath: string) => Promise) | null; describeEventPath: (eventPath: string) => string; generate: () => Promise; signal: AbortSignal | undefined; onReady: (() => void) | undefined; logger: Pick; }): Promise; declare class FileWatcher extends EventEmitter { private watchPaths; private options; private snapshot; private nativeWatchers; private closed; private scanRunning; private scanAgain; private rescanInterval; constructor(watchPaths: string[], options: WatchOptions); start(): Promise; close(): Promise; private startNativeWatchers; private startPollingFallback; private resolveWatchRoot; private requestScan; private scan; private emitSnapshotDiff; private readSnapshot; private findFiles; private isIgnored; private emitError; } export {};