import type { Compiler } from "./Compiler"; import { Remote } from "comlink"; import { BundleBuffer } from "./Evaluator/BundleBuffer"; import { EnvTag } from "./utils/EnvCheck"; /** 一个单独的 Compiler 执行环境, 专门用于 适配 执行 的环境 */ export declare class Evaluator { System: any; Compiler: Compiler | Remote; moduleConfig: Compiler["moduleConfig"]; get root(): string; static registered: boolean; constructor(); destroyed: boolean; destroy(): void; createEnv({ Compiler, worker, root, wrap, env, }?: { Compiler?: Compiler; env?: EnvTag; /** * 极端情况下覆盖 worker 选项 */ worker?: "module" | "classic"; root?: string; wrap?: boolean; }): Promise; env: EnvTag; timeBuffer: BundleBuffer; bufferCacheTime: number; HookSystemJS(): void; createCompilerPort(): Promise; evaluate(path: string): Promise; useWorker(workerUrlOrPort: string | MessagePort): Promise; }