import { Got } from '../network/got';
import { Package } from '../types';
import { LoggedPkg } from 'pnpm-logger';
export declare type ResolveResult = {
    id: string;
    pkg?: Package;
    tarball?: string;
    shasum?: string;
    root?: string;
    repo?: string;
    ref?: string;
    fetch?: (target: string) => Promise<void>;
};
export declare type PackageSpec = {
    raw: string;
    name: string;
    scope: string;
    type: string;
    spec: string;
    rawSpec: string;
};
export declare type HostedPackageSpec = PackageSpec & {
    hosted: {
        type: string;
        shortcut: string;
        sshUrl: string;
    };
};
export declare type ResolveOptions = {
    loggedPkg: LoggedPkg;
    got: Got;
    root: string;
    linkLocal: boolean;
    tag: string;
};
/**
 * Resolves a package in the NPM registry. Done as part of `install()`.
 *
 * @example
 *     var npa = require('npm-package-arg')
 *     resolve(npa('rimraf@2'))
 *       .then((res) => {
 *         res.id == 'rimraf@2.5.1'
 *         res.dist == {
 *           shasum: '0a1b2c...'
 *           tarball: 'http://...'
 *         }
 *       })
 */
export default function (spec: PackageSpec, opts: ResolveOptions): Promise<ResolveResult>;
