import type { Config } from "./config.js"; type WatchOptions = { /** * The resolved gen-x configuration. Loaded once at startup to avoid * repeated esbuild transforms on every file change. */ config: Config; /** * The path to the package.json file to write exports to. */ packageJsonPath: string; /** * An AbortSignal to stop watching and clean up the file watcher. * Similar to a React useEffect cleanup function. */ signal?: AbortSignal; }; /** * Start watching the input directory for file changes and regenerate * package.json#exports automatically. Runs an initial generation, then * watches for subsequent changes. * * Pass an AbortSignal to stop watching. The signal is forwarded to * `fs.watch`, which closes the watcher when aborted. */ declare function startWatch({ config, packageJsonPath, signal }: WatchOptions): Promise; /** * Watch the input directory for file changes and regenerate package.json#exports * automatically. Runs an initial generation, then blocks indefinitely until the * process is terminated via SIGINT or SIGTERM. */ declare function watch(options: Omit): Promise; export { startWatch, watch, }; export type { WatchOptions, };