import type { FSWatcher, WatchOptions as ChokidarOptions } from 'chokidar'; export interface PrebuildOptions { /** * Enable use pre-built schema if found. * * @default process.env.NODE_ENV === "production" */ enabled?: boolean; /** * If "targetPath" is set to `null`, pre-built schema generation is disabled * @default * "./mercurius-schema.json" */ targetPath?: string | null; } export interface WatchOptions { /** * Enable file watching * @default false */ enabled?: boolean; /** * Custom function to be executed after schema change */ onChange?: (schema: string[]) => void; /** * Extra Chokidar options to be passed */ chokidarOptions?: ChokidarOptions; /** * Unique watch instance * * `Specially useful for hot module replacement environments, preventing memory leaks` * * @default true */ uniqueWatch?: boolean; } export interface LoadSchemaOptions { /** * Watch options */ watchOptions?: WatchOptions; /** * Pre-build options */ prebuild?: PrebuildOptions; /** * Don't notify to the console */ silent?: boolean; } export declare function loadSchemaFiles(schemaPath: string | string[], { watchOptions, prebuild, silent }?: LoadSchemaOptions): { schema: string[]; closeWatcher: () => Promise; watcher: Promise; };