import { FSWatcher } from "chokidar"; export type WatchEventType = "add" | "addDir" | "change" | "unlink" | "unlinkDir"; export interface WatchOptions { /** * Directory to watch */ watchDir: string; /** * Callback when a file is modified * @param error - Error if any * @param filepath - Absolute path of the changed file * @param eventType - Type of change: "add", "change", "unlink", etc. */ callback: (error: Error | null, filepath?: string, eventType?: WatchEventType) => void; /** * Output folder to ignore (in addition to _book and node_modules) * This prevents infinite rebuild loops when using custom output folders * @see https://github.com/honkit/honkit/issues/491 */ outputFolder?: string; } /** * Watch a folder and call callback when a file is modified * * @param {WatchOptions} options * @return {FSWatcher} The chokidar watcher instance */ declare function watch(options: WatchOptions): FSWatcher; export default watch; //# sourceMappingURL=watch.d.ts.map