/// <reference types="node" resolution-mode="require"/>
import type { Resource } from '../index.js';
import type { Config, JsUpdateResult } from '../types/binding.js';
import { type ILogger } from '../utils/logger.js';
export declare const VIRTUAL_FARM_DYNAMIC_IMPORT_SUFFIX = ".farm_dynamic_import_virtual_module";
/**
 * Cause the update process is async, we need to keep the update queue to make sure the update process is executed in order.
 * So the latter update process will not override the previous one if they are updating at the same time.
 */
export interface UpdateQueueItem {
    paths: string[];
    resolve: (res: JsUpdateResult) => void;
}
export type PluginStats = Record<string, Record<string, {
    totalDuration: number;
    callCount: number;
}>>;
export declare class Compiler {
    config: Config;
    private logger;
    private _bindingCompiler;
    private _updateQueue;
    private _onUpdateFinishQueue;
    compiling: boolean;
    constructor(config: Config, logger?: ILogger);
    traceDependencies(): Promise<string[]>;
    compile(): Promise<void>;
    compileSync(): void;
    update(paths: string[], sync?: boolean, ignoreCompilingCheck?: boolean, generateUpdateResource?: boolean): Promise<JsUpdateResult>;
    hasModule(resolvedPath: string): boolean;
    getParentFiles(idOrResolvedPath: string): string[];
    resources(): Record<string, Buffer>;
    resource(path: string): Buffer;
    resourcesMap(): Record<string, Resource>;
    pluginStats(): PluginStats;
    writeResourcesToDisk(): void;
    callWriteResourcesHook(): void;
    removeOutputPathDir(): void;
    resolvedWatchPaths(): string[];
    resolvedModulePaths(root: string): string[];
    transformModulePath(root: string, p: string): string;
    onUpdateFinish(cb: () => void): void;
    outputPath(): string;
    addExtraWatchFile(root: string, paths: string[]): void;
    modules(): import("../index.js").Module[];
    getResolveRecords(id: string): import("../types/binding.js").ResolveRecord[];
    getTransformRecords(id: string): import("../types/binding.js").TransformRecord[];
    getProcessRecords(id: string): import("../types/binding.js").ModuleRecord[];
    getAnalyzeDepsRecords(id: string): import("../types/binding.js").AnalyzeDepsRecord[];
    getResourcePotRecordsById(id: string): import("../types/binding.js").ResourcePotRecord[];
}
