import type { VirtualFS } from './virtual-fs';
export type ModuleFormat = 'esm' | 'cjs' | 'json' | 'builtin' | 'asset' | 'raw';
export interface ResolvedModuleDescriptor {
    id: string;
    resolvedPath: string;
    format: ModuleFormat;
    builtinId?: string;
}
export interface ModuleResolverOptions {
    builtinModules?: Record<string, unknown>;
}
export declare class ModuleResolver {
    private vfs;
    private builtinModules;
    private caches;
    constructor(vfs: VirtualFS, options?: ModuleResolverOptions);
    clearCache(): void;
    resolve(specifier: string, fromDir: string): ResolvedModuleDescriptor;
    detectFormat(filePath: string, sourceOverride?: string): ModuleFormat;
    private getBuiltinId;
    private resolvePackageImport;
    private resolveFileSpecifier;
    /**
     * Resolve a vite/webpack asset import to a synthetic asset/raw module, or null
     * if the specifier isn't an asset request. The id encodes the kind
     * (`<path>?raw` / `<path>?asset`) so it round-trips through the module graph's
     * URL-based transport.
     */
    private resolveAssetRequest;
    private resolveNodeModulesSpecifier;
    private tryResolveFromNodeModules;
    private tryResolveFile;
    private resolveDirectoryIndex;
    private getParsedPackageJson;
    private getPackageTypeForFile;
    private getExportsSpecifier;
    private safeReadFile;
}
export declare function extractLikelyNamedExportsFromCode(code: string): string[];
//# sourceMappingURL=module-resolution.d.ts.map