import type { ResponseData } from './shims/http';
import type { VirtualFS } from './virtual-fs';
import { type ModuleFormat, type ResolvedModuleDescriptor } from './module-resolution';
export interface LoadedModuleRecord {
    format: ModuleFormat;
    id: string;
    url: string;
    namespace?: Record<string, unknown>;
}
export interface ModuleGraphLoaderOptions {
    vfs: VirtualFS;
    runtimeId: string;
    builtinModules: Record<string, unknown>;
    console: Record<string, unknown>;
    process: Record<string, unknown>;
    globalObject: Record<string, unknown>;
    requireCjs: (resolvedPath: string) => unknown;
    createRequire: (fromPath: string) => {
        (id: string): unknown;
        resolve?: (id: string) => string;
        cache?: Record<string, unknown>;
    };
}
export declare class ModuleGraphLoader {
    private vfs;
    private runtimeId;
    private builtinModules;
    private globalObject;
    private requireCjs;
    private createRequire;
    private resolver;
    private transportMode;
    private revision;
    private bridgeRegistered;
    private bridgeReadyPromise;
    private nodeModuleDirPromise;
    private nodeFileRecordCache;
    private buildingNodeFiles;
    private urlCache;
    private sourceCache;
    private moduleCache;
    constructor(options: ModuleGraphLoaderOptions);
    clearCache(): void;
    importModule(specifier: string, fromPath?: string): Promise<LoadedModuleRecord>;
    resolve(specifier: string, fromPath?: string): ResolvedModuleDescriptor;
    createResponse(requestUrl: string): Promise<ResponseData>;
    private importResolved;
    private getModuleUrl;
    private buildModuleSource;
    private buildEsmModuleSource;
    private maybeTranspileTypeScript;
    private createRuntimePreamble;
    private buildJsonModuleSource;
    private buildBuiltinModuleSource;
    private buildRawModuleSource;
    private buildAssetModuleSource;
    private buildCjsModuleSource;
    private getRuntimeNamedExports;
    private rewriteEsmSpecifiers;
    private getImportUrl;
    private ensureBridgeReady;
    private createServiceWorkerUrl;
    private getContentHash;
    private getModuleSourceHash;
    private resolveDescriptorById;
    private getCacheKey;
    private detectTransportMode;
    private reserveNodeFileRecord;
    private writeNodeFileSource;
    private getNodeModuleDir;
    private notFound;
}
//# sourceMappingURL=module-graph-loader.d.ts.map