export declare function run(projectRoot: string): Promise<CompilerHost>;
export declare class CompilerHost {
    private projectRoot;
    private spawn;
    private intevalId;
    constructor(projectRoot: string);
    stop(): void;
    /**
     * code: -2 服务器已关闭
     * code: -1 启动中
     * code: 0  正在编译
     * code: 1  编译成功
     * code: 2  编译失败
     */
    onStatsChange: (states: {
        code: number;
        message: string;
    }) => void;
    private getStats;
    start(): void;
}
