import type { StackDeps } from "../stack/commands.js"; /** Watches `paths` (folders recursively, or files), calling `onChange` with a path that changed. */ export type FolderWatcher = (paths: readonly string[], onChange: (path: string) => void) => { close(): void; }; /** `node:fs` `watch`, recursive for a folder. */ export declare const nodeWatcher: FolderWatcher; export interface WatchOptions { watcher?: FolderWatcher; /** Ends the watch; by default SIGINT or SIGTERM. */ signal?: AbortSignal; /** How long changes settle before a cycle (default 200 ms). */ debounceMs?: number; } /** * Checks and plans `dirs` (apply's other flags in `args`) now and on each change, saving with * `save`, until the signal ends it. */ export declare function watchApply(deps: StackDeps, run: { dirs: readonly string[]; args: readonly string[]; save: boolean; }, options?: WatchOptions): Promise;