import { ModuleAddress } from "../types/ModuleAddress";
import type { getInstalledVersionPackageJsonFactory } from "../getInstalledVersionPackageJson";
type GetValidImportUrl = (params: {
    target: "DEFAULT EXPORT";
} | {
    target: "SPECIFIC FILE";
    specificImportPath: string;
}) => Promise<string>;
type Result = {
    result: "SUCCESS";
    getValidImportUrl: GetValidImportUrl;
} | {
    result: "UNKNOWN BUILTIN";
};
export declare function resolveNodeModuleToDenoModuleFactory(params: {
    userProvidedPorts: {
        [nodeModuleName: string]: string;
    };
    dependencies: {
        [nodeModuleName: string]: string;
    };
    devDependencies: {
        [nodeModuleName: string]: string;
    };
    log: typeof console.log;
} & ReturnType<typeof getInstalledVersionPackageJsonFactory>): {
    resolveNodeModuleToDenoModule: (params: {
        nodeModuleName: string;
    }) => Promise<Result>;
};
export type ValidImportUrlResult = {
    couldConnect: false;
} | {
    couldConnect: true;
    versionFallbackWarning: string | undefined;
    getValidImportUrl: GetValidImportUrl;
};
/** Exported only for tests purpose */
export declare const getValidImportUrlFactory: (params: {
    moduleAddress: ModuleAddress;
} & ({
    desc: "NOT LISTED AS A DEPENDENCY (PROBABLY NODE BUILTIN)";
} | {
    desc: "MATCH VERSION INSTALLED IN NODE_MODULES";
    version: string;
})) => Promise<ValidImportUrlResult>;
export {};
