/**
 * Rest Type Synthesis — Helpers & Pattern Synthesis
 *
 * Types, context management, hash generation, member extraction/computation,
 * and pattern synthesis for rest type lowering. Split from
 * rest-type-synthesis-pass.ts for file-size compliance.
 */
import { IrType, IrModule, IrPattern, IrObjectExpression, IrInterfaceMember, IrClassDeclaration } from "../types.js";
/**
 * Result of rest type synthesis pass
 */
export type RestTypeSynthesisResult = {
    readonly ok: boolean;
    readonly modules: readonly IrModule[];
};
/**
 * Context for tracking state during synthesis
 */
export type SynthesisContext = {
    /** Generated class declarations for rest types */
    readonly generatedDeclarations: IrClassDeclaration[];
    /** Map from shape signature to generated type name for deduplication */
    readonly shapeToName: Map<string, string>;
    /** Module file path for unique naming */
    readonly moduleFilePath: string;
};
/**
 * Create a fresh synthesis context for a module
 */
export declare const createContext: (moduleFilePath: string) => SynthesisContext;
/**
 * Extract property signatures from a type
 * Works for object types, reference types (resolved to interface), etc.
 */
export declare const extractMembers: (type: IrType) => readonly IrInterfaceMember[] | undefined;
/**
 * Synthesize rest types in a pattern, given the RHS type
 */
export declare const synthesizePattern: (pattern: IrPattern, rhsType: IrType | undefined, ctx: SynthesisContext) => IrPattern;
/**
 * Derive a structural object type from an object-literal expression.
 *
 * This is a fallback for cases where the IR has already lowered the expression
 * to a synthesized anonymous type reference (e.g. __Anon_*), which erases member
 * information from inferredType. Rest synthesis requires member shapes.
 */
export declare const deriveObjectTypeFromObjectExpression: (expr: IrObjectExpression) => IrType | undefined;
/**
 * Extract element type from array/iterable type
 */
export declare const extractElementType: (type: IrType) => IrType | undefined;
//# sourceMappingURL=rest-type-synthesis-helpers.d.ts.map