/** Folders whose contents never change what the preview shows (or change on every build). */ export declare const SKIPPED_DIRS: Set; /** File types whose change can change what the preview shows. */ export declare const WATCHED_EXTENSIONS: Set; export declare const SETTLE_MS = 200; /** Whether a changed path (relative to its watched root) can change the preview. */ export declare function isWatchedPath(relative: string): boolean; /** * Roots worth their own watcher: a root inside another one is already seen * through it, unless it sits under a skipped folder there (a served `build/`). */ export declare function distinctRoots(roots: readonly string[]): string[]; export interface ProjectWatcher { close: () => void; } /** Linux watches folder by folder: past this many, the rest go unwatched. */ export declare const MAX_LINUX_DIRS = 4000; export interface WatchProjectOptions { settleMs?: number; /** Watch folder by folder (the Linux way) on any platform. */ byFolder?: boolean; log?: (message: string, fields?: Record) => void; } /** * Calls `onChange` with the changed files (absolute paths) once edits have * been quiet for `settleMs`, so a multi-file edit counts as one change. * `since` is when the first of them was seen (epoch ms). */ export declare function watchProject(roots: readonly string[], onChange: (files: string[], since: number) => void, opts?: WatchProjectOptions): ProjectWatcher;