import { PackageSpec } from '../resolve';
import { Package } from '../types';
import { Got } from '../network/got';
import { InstallContext } from '../api/install';
export declare type FetchOptions = {
    keypath?: string[];
    linkLocal: boolean;
    force: boolean;
    root: string;
    storePath: string;
    tag: string;
    got: Got;
    update?: boolean;
};
export declare type FetchedPackage = {
    fetchingPkg: Promise<Package>;
    fetchingFiles: Promise<void>;
    path: string;
    srcPath?: string;
    id: string;
    fromCache: boolean;
    abort(): Promise<void>;
};
/**
 * Installs a package.
 *
 * What it does:
 *
 * - resolve() - resolve from registry.npmjs.org
 * - fetch() - download tarball into node_modules/.store/{name}@{version}
 * - recurse into its dependencies
 * - symlink node_modules/{name}
 *
 * @param {Object} ctx - the context.
 * @param {Object} pkgMeta - meta info about the package to install.
 *
 * @example
 *     install(ctx, 'rimraf@2', './node_modules')
 */
export default function fetch(ctx: InstallContext, spec: PackageSpec, modules: string, options: FetchOptions): Promise<FetchedPackage>;
