/**
 * Anonymous Object Literal Synthesis (TSN7403)
 *
 * When an object literal has no contextual nominal type, we synthesize a
 * nominal type from the AST structure. This enables:
 * - Object literals without explicit type annotations
 * - Spread expressions in object literals
 * - Function-valued properties (as delegates)
 *
 * DETERMINISTIC IR TYPING (INV-0 compliant):
 * This module uses only AST-based synthesis. Property types come from the
 * converted expression's inferredType, not from TS computed types.
 *
 * Eligibility:
 * ✅ Allowed: identifier keys, string/numeric literal keys, deterministically-known computed literal keys,
 *            spreads with typed sources, function-valued properties, getters/setters
 * ❌ Rejected: non-deterministic computed keys, symbol keys
 */
import * as ts from "typescript";
import { IrType, IrInterfaceDeclaration, IrTypeParameter } from "../types.js";
import type { ProgramContext } from "../program-context.js";
/**
 * Property info for shape signature (AST-based, no TS type computation)
 */
export type PropertyInfo = {
    readonly name: string;
    readonly type: IrType;
    readonly optional: boolean;
    readonly readonly: boolean;
};
/**
 * Compute a stable shape signature from property info (AST-based)
 *
 * DETERMINISTIC: Takes pre-computed PropertyInfo array, no TS type computation.
 *
 * Format: sorted properties with their types, optionality, and readonly flags
 * Example: "count:number;name?:string;readonly:id:string"
 */
export declare const computeShapeSignature: (props: readonly PropertyInfo[]) => string;
/**
 * Registry entry for a synthetic type
 */
type SyntheticTypeEntry = {
    readonly name: string;
    readonly declaration: IrInterfaceDeclaration;
    readonly typeParameters: readonly IrTypeParameter[];
};
/**
 * Reset the registry (call at the start of each file/module compilation)
 */
export declare const resetSyntheticRegistry: () => void;
/**
 * Generate a synthetic type name from location
 *
 * Format: __Anon_<FileStem>_<Line>_<Col>
 */
export declare const generateSyntheticName: (fileStem: string, line: number, col: number) => string;
/**
 * Get or create a synthetic type for a shape
 *
 * DETERMINISTIC: Takes pre-computed PropertyInfo array, no TS type computation.
 * Returns existing type if shape was seen before (deduplication).
 */
export declare const getOrCreateSyntheticType: (shapeSignature: string, name: string, props: readonly PropertyInfo[], capturedTypeParams: readonly IrTypeParameter[]) => SyntheticTypeEntry;
/**
 * Get all synthetic type declarations (call after processing a file)
 */
export declare const getSyntheticDeclarations: () => readonly IrInterfaceDeclaration[];
/**
 * Result of eligibility check
 */
export type EligibilityResult = {
    eligible: true;
} | {
    eligible: false;
    reason: string;
};
/**
 * Check if an object literal expression is eligible for synthesis
 *
 * DETERMINISTIC IR TYPING (INV-0 compliant):
 * Uses symbol-based checks, not getTypeAtLocation.
 *
 * Eligible:
 * - All property keys are identifiers or string literals
 * - Spread expressions have typed sources (identifiers with type annotations)
 * - Method shorthand is allowed only when it does not rely on dynamic this/super/arguments
 * - No getters/setters
 * - No computed keys with non-literal expressions
 *
 * Phase 5 Step 4: Uses ProgramContext for unified semantic access.
 */
export declare const checkSynthesisEligibility: (node: ts.ObjectLiteralExpression, ctx: ProgramContext) => EligibilityResult;
/**
 * Find type parameters used in a type
 */
export declare const findUsedTypeParameters: (type: IrType, inScopeParams: ReadonlySet<string>) => Set<string>;
export {};
//# sourceMappingURL=anonymous-synthesis.d.ts.map