import type { ChokidarOptions } from 'chokidar'; import type { Compiler } from 'webpack'; export type WatchFiles = { paths: string[] | string; options?: ChokidarOptions; }; export type CompilerServerOptions = { watchFiles: WatchFiles[]; setupExitSignals?: boolean; onStaticChanged?: (item: any) => void; }; export declare class CompilerServer { private readonly compiler; private readonly options; private staticWatchers; private watching; private listeners; constructor(compiler: Compiler, options: CompilerServerOptions); start(): Promise; recompile(): Promise; /** * Start the compiler server with a callback * @param callback - The callback function */ startCallback(callback?: (err?: Error) => void): void; /** * Stop the compiler server */ stop(): Promise; /** * Stop the compiler server with a callback * @param callback - The callback function */ stopCallback(callback?: (err?: Error) => void): void; private initialize; private setupWatchFiles; private watchFiles; }