/**
 * NominalEnv - Inheritance instantiation environment
 *
 * Phase 6 (Alice's spec): TypeId-based, Universe-driven.
 *
 * Computes type parameter substitution through inheritance chains
 * deterministically, using only the UnifiedTypeCatalog (no TypeNodes).
 */
import { type IrType } from "../../types/index.js";
import type { UnifiedTypeCatalog, TypeId } from "./universe/types.js";
/**
 * Map from type parameter name to concrete IR type
 */
export type InstantiationEnv = ReadonlyMap<string, IrType>;
/**
 * Substitution result for a specific type in the inheritance chain
 */
export type SubstitutionResult = {
    readonly declaringTypeId: TypeId;
    readonly substitution: InstantiationEnv;
};
/**
 * NominalEnv API - Phase 6: TypeId-based
 */
export type NominalEnv = {
    /**
     * Find which nominal type in the inheritance chain declares a given member.
     * Returns the TypeId and the substitution needed to access that member.
     */
    readonly findMemberDeclaringType: (receiverTypeId: TypeId, receiverTypeArgs: readonly IrType[], memberName: string) => SubstitutionResult | undefined;
    /**
     * Get type parameter substitution for accessing a member from a target type
     * when the receiver has the given TypeId and type arguments.
     *
     * Example:
     * ```typescript
     * class SomeBase<T> { value: List<T>; }
     * class SomeClass extends SomeBase<int> {}
     *
     * // getInstantiation(SomeClassId, [], SomeBaseId)
     * // → { "T" → int }
     * ```
     */
    readonly getInstantiation: (receiverTypeId: TypeId, receiverTypeArgs: readonly IrType[], targetTypeId: TypeId) => InstantiationEnv | undefined;
    /**
     * Get the complete inheritance chain for a nominal type.
     * Returns TypeIds in order from child to parent.
     */
    readonly getInheritanceChain: (typeId: TypeId) => readonly TypeId[];
};
/**
 * Apply a substitution map to an IrType.
 * Replaces typeParameterType nodes with their concrete values.
 */
export declare const substituteIrType: (type: IrType, subst: InstantiationEnv) => IrType;
/**
 * Build a NominalEnv from a UnifiedTypeCatalog.
 *
 * Phase 6: Uses ONLY the catalog for all lookups. No TypeRegistry, no TypeNodes.
 *
 * @param catalog The UnifiedTypeCatalog to use for lookups
 */
export declare const buildNominalEnv: (catalog: UnifiedTypeCatalog) => NominalEnv;
//# sourceMappingURL=nominal-env.d.ts.map