import { type IPackageJson } from '@rushstack/node-core-library';
import type { ITerminal } from '@rushstack/terminal';
import type { IRigConfig } from '@rushstack/rig-package';
/**
 * Rig resolves requested tools from the project's Heft rig.
 *
 * @remarks For more information on rig resolution, see
 * https://rushstack.io/pages/heft/rig_packages/#3-riggable-dependencies
 *
 * @public
 */
export interface IRigPackageResolver {
    resolvePackageAsync(packageName: string, terminal: ITerminal): Promise<string>;
}
/**
 * Options for creating a RigPackageResolver.
 */
export interface IRigPackageResolverOptions {
    buildFolder: string;
    projectPackageJson: IPackageJson;
    rigConfig: IRigConfig;
}
/**
 * Rig resolves requested tools from the project's Heft rig.
 */
export declare class RigPackageResolver implements IRigPackageResolver {
    private readonly _buildFolder;
    private readonly _projectPackageJson;
    private readonly _rigConfig;
    private readonly _packageJsonLookup;
    private readonly _resolverCache;
    constructor(options: IRigPackageResolverOptions);
    /**
     * Rig resolve the path to a specific package.
     *
     * The following rules will apply when rig resolving a package:
     * - If the local project has a devDependency (not regular or peer dependency) on the tool,
     *   that has highest precedence.
     * - OTHERWISE if there is a rig.json file, then look at the rig's package.json. Does it have a
     *   regular dependency (not dev or peer dependency) on the tool? If yes, then
     *   resolve the tool from the rig package folder.
     * - OTHERWISE try to resolve it from the current project.
     */
    resolvePackageAsync(packageName: string, terminal: ITerminal): Promise<string>;
    private _resolvePackageInnerAsync;
}
//# sourceMappingURL=RigPackageResolver.d.ts.map