import { type DepsStateCache } from '@pnpm/calc-dep-state';
import { type InstallationResultStats } from '@pnpm/headless';
import { type LockfileObject } from '@pnpm/lockfile.fs';
import { type IncludedDependencies } from '@pnpm/modules-yaml';
import { type DependenciesGraph, type LinkedDependency } from '@pnpm/resolve-dependencies';
import { type StoreController } from '@pnpm/store-controller-types';
import { type DepPath, type HoistedDependencies, type Registries } from '@pnpm/types';
import { type ImporterToUpdate } from './index';
export interface LinkPackagesOptions {
    allowBuild?: (pkgName: string) => boolean;
    currentLockfile: LockfileObject;
    dedupeDirectDeps: boolean;
    dependenciesByProjectId: Record<string, Map<string, DepPath>>;
    disableRelinkLocalDirDeps?: boolean;
    force: boolean;
    depsStateCache: DepsStateCache;
    extraNodePaths: string[];
    hoistedDependencies: HoistedDependencies;
    hoistedModulesDir: string;
    hoistPattern?: string[];
    ignoreScripts: boolean;
    publicHoistPattern?: string[];
    include: IncludedDependencies;
    linkedDependenciesByProjectId: Record<string, LinkedDependency[]>;
    lockfileDir: string;
    makePartialCurrentLockfile: boolean;
    outdatedDependencies: Record<string, string>;
    pruneStore: boolean;
    pruneVirtualStore: boolean;
    registries: Registries;
    rootModulesDir: string;
    sideEffectsCacheRead: boolean;
    symlink: boolean;
    skipped: Set<DepPath>;
    storeController: StoreController;
    virtualStoreDir: string;
    virtualStoreDirMaxLength: number;
    wantedLockfile: LockfileObject;
    wantedToBeSkippedPackageIds: Set<string>;
    hoistWorkspacePackages?: boolean;
}
export interface LinkPackagesResult {
    currentLockfile: LockfileObject;
    newDepPaths: DepPath[];
    newHoistedDependencies: HoistedDependencies;
    removedDepPaths: Set<string>;
    stats: InstallationResultStats;
}
export declare function linkPackages(projects: ImporterToUpdate[], depGraph: DependenciesGraph, opts: LinkPackagesOptions): Promise<LinkPackagesResult>;
