import { PackageJson } from '@pnpm/types';
/**
 * tarball hosted remotely
 */
export interface TarballResolution {
    type?: undefined;
    tarball: string;
    integrity?: string;
    registry?: string;
}
/**
 * directory on a file system
 */
export interface DirectoryResolution {
    type: 'directory';
    directory: string;
}
export declare type Resolution = TarballResolution | DirectoryResolution | ({
    type: string;
} & object);
export interface ResolveResult {
    id: string;
    resolution: Resolution;
    package?: PackageJson;
    latest?: string;
    normalizedPref?: string;
}
export interface ResolveOptions {
    defaultTag?: string;
    registry: string;
    prefix: string;
    preferredVersions: {
        [packageName: string]: {
            selector: string;
            type: 'version' | 'range' | 'tag';
        };
    };
}
export declare type WantedDependency = {
    alias?: string;
    pref?: string;
} & ({
    alias: string;
    pref: string;
} | {
    alias: string;
} | {
    pref: string;
});
export declare type ResolveFunction = (wantedDependency: WantedDependency, opts: ResolveOptions) => Promise<ResolveResult>;
