/**
 * Anonymous Type Lower Types
 *
 * Core type, parameter, type-parameter, interface-member, and pattern
 * lowering functions. These replace IrObjectType nodes with IrReferenceType
 * nodes in type positions throughout the IR tree.
 *
 * Note: This module and anon-type-ir-rewriting.ts form a mutual recursion
 * group (e.g. lowerParameter -> lowerExpression -> lowerBlockStatement ->
 * lowerStatement -> lowerExpression). The circular import is safe because
 * all exports are const arrow functions that are not invoked at import time.
 */
import type { IrType, IrParameter, IrTypeParameter, IrInterfaceMember, IrPattern, IrReferenceType, IrClassDeclaration } from "../types.js";
/**
 * Context for tracking state during lowering
 */
export type LoweringContext = {
    /** Generated class declarations (shared across modules) */
    readonly generatedDeclarations: IrClassDeclaration[];
    /** Map from shape signature to generated type name for deduplication (shared across modules) */
    readonly shapeToName: Map<string, string>;
    /** Existing reusable structural reference types available across the compilation, keyed by shape signature. */
    readonly shapeToExistingReference: Map<string, IrReferenceType>;
    /** Local named type declarations in the current module, keyed by authored type name. */
    readonly localDeclaredTypeReferences: ReadonlyMap<string, IrReferenceType>;
    /** Module file path for unique naming */
    readonly moduleFilePath: string;
    /** Type names already declared in the compilation (avoid collisions) */
    readonly existingTypeNames: ReadonlySet<string>;
    /** Current function's lowered return type (for propagating to return statements) */
    readonly currentFunctionReturnType?: IrType;
    /** Cycle-safe cache for lowering recursive type graphs by identity. */
    readonly loweredTypeByIdentity: WeakMap<object, IrType>;
    /** Cycle-safe cache for lowering reference types across cloned nodes. */
    readonly loweredReferenceByStableKey: Map<string, IrReferenceType>;
};
/**
 * Lower a type, replacing objectType with referenceType
 */
export declare const lowerType: (type: IrType, ctx: LoweringContext, _nameHint?: string) => IrType;
/**
 * Lower a parameter
 */
export declare const lowerParameter: (param: IrParameter, ctx: LoweringContext) => IrParameter;
/**
 * Lower a type parameter
 */
export declare const lowerTypeParameter: (tp: IrTypeParameter, ctx: LoweringContext) => IrTypeParameter;
/**
 * Lower an interface member
 *
 * IMPORTANT: We MUST lower objectType in all type positions before the emitter.
 * The emitter is not allowed to see IrObjectType nodes (soundness gate enforces this).
 */
export declare const lowerInterfaceMember: (member: IrInterfaceMember, ctx: LoweringContext) => IrInterfaceMember;
/**
 * Lower a pattern
 */
export declare const lowerPattern: (pattern: IrPattern, ctx: LoweringContext) => IrPattern;
//# sourceMappingURL=anon-type-lower-types.d.ts.map