/// <reference types="node" resolution-mode="require"/>
/// <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 interface TracedModuleGraph {
    root: string;
    modules: Array<{
        id: string;
        contentHash: string;
        packageName: string;
        packageVersion: string;
    }>;
    edges: Record<string, string[]>;
    reverseEdges: Record<string, string[]>;
}
export declare class Compiler {
    config: Config;
    private logger;
    private _bindingCompiler;
    private _updateQueue;
    private _onUpdateFinishQueue;
    compiling: boolean;
    constructor(config: Config, logger?: ILogger);
    traceDependencies(): Promise<object>;
    traceModuleGraph(): Promise<TracedModuleGraph>;
    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>;
    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;
    stats(): string;
    invalidateModule(moduleId: string): void;
}
