/**
 * Numeric Classification - Expression classification and type helpers
 *
 * This sub-module provides:
 * - classifyNumericExpr: Classify an expression's numeric kind
 * - hasExplicitDoubleIntent: Check if an expression has explicit double intent
 * - getExpectedNumericKind: Get the expected numeric kind from a type
 * - tryGetObjectPropertyType: Extract expected type of a property from structural type
 * - tryGetTupleElementType: Extract expected type of a tuple element
 * - needsCoercion: Check if an expression needs coercion to match expected type
 * - describeExpression: Get human-readable description of an expression
 * - moduleLocation: Create a source location for a module
 *
 * Split from numeric-coercion-pass.ts for file-size management.
 */
import { SourceLocation, type Diagnostic } from "../../types/diagnostic.js";
import { IrExpression, IrType } from "../types.js";
import { NumericKind } from "../types/numeric-kind.js";
/**
 * Result of numeric expression classification.
 * - "Int32": Expression definitely produces an Int32 value
 * - "Double": Expression definitely produces a Double value
 * - "Unknown": Cannot determine at compile time (e.g., untyped identifier, complex call)
 */
export type NumericExprKind = "Int32" | "Double" | "Unknown";
/**
 * Classify an expression's numeric kind.
 *
 * This function propagates numeric kind through:
 * - Literals (via numericIntent)
 * - Identifiers with primitiveType(name="int") or primitiveType(name="number")
 * - Arithmetic operations (uses C# promotion rules)
 * - Unary +/- (preserves operand kind)
 * - Ternary (requires both branches to have same kind)
 * - Parentheses (pass through)
 * - numericNarrowing expressions (uses targetKind)
 *
 * Returns "Unknown" for expressions that cannot be classified.
 */
export declare const classifyNumericExpr: (expr: IrExpression) => NumericExprKind;
/**
 * Check if an expression has explicit double intent.
 * This is true when:
 * - It's a numericNarrowing with targetKind "Double" (i.e., `42 as number`)
 * - It's a literal with numericIntent "Double" (i.e., `42.0`)
 *
 * Used to exempt explicit casts from TSN5110 errors.
 */
export declare const hasExplicitDoubleIntent: (expr: IrExpression) => boolean;
/**
 * Context for tracking coercion validation
 */
export type CoercionContext = {
    readonly filePath: string;
    readonly diagnostics: Diagnostic[];
};
/**
 * Create a source location for a module
 */
export declare const moduleLocation: (ctx: CoercionContext) => SourceLocation;
/**
 * Get the expected numeric kind from a type.
 * Returns undefined if the type is not a numeric type.
 *
 * Maps:
 * - primitiveType("number") → "Double"
 * - primitiveType("int") → "Int32"
 * - referenceType with name in TSONIC_TO_NUMERIC_KIND → corresponding kind
 */
export declare const getExpectedNumericKind: (type: IrType | undefined) => NumericKind | undefined;
/**
 * Extract the expected type of a property from a structural type.
 *
 * Used for validating object literal properties against their expected types.
 * Returns undefined if the property type cannot be determined (conservative).
 *
 * Handles:
 * - objectType: inline object types like `{ x: number }`
 * - referenceType with structuralMembers: interfaces and type aliases
 */
export declare const tryGetObjectPropertyType: (expectedType: IrType | undefined, propName: string) => IrType | undefined;
/**
 * Extract the expected type of a tuple element at a given index.
 *
 * Used for validating tuple literal elements against their expected types.
 * Returns undefined if the element type cannot be determined.
 */
export declare const tryGetTupleElementType: (expectedType: IrType | undefined, index: number) => IrType | undefined;
/**
 * Check if an expression needs coercion to match an expected numeric type.
 *
 * Returns true (error) only for NARROWING conversions.
 * Widening conversions (e.g., Int32 → Double) are implicitly allowed.
 *
 * Rules:
 * - Same kind → OK
 * - Widening (isWideningConversion returns true) → OK
 * - Narrowing → requires explicit intent (numericNarrowing node)
 */
export declare const needsCoercion: (expr: IrExpression, expectedType: IrType | undefined) => boolean;
/**
 * Get a human-readable description of an expression for error messages.
 */
export declare const describeExpression: (expr: IrExpression) => string;
//# sourceMappingURL=numeric-classification.d.ts.map