/**
 * Helper functions for expression conversion
 *
 * ALICE'S SPEC: All type resolution goes through TypeSystem.
 * NO getHandleRegistry() calls allowed here.
 */
import * as ts from "typescript";
import { IrType } from "../../types.js";
import { SourceLocation } from "../../../types/diagnostic.js";
import type { ProgramContext } from "../../program-context.js";
/**
 * Get source span for a TypeScript node.
 * Returns a SourceLocation that can be used for diagnostics.
 */
export declare const getSourceSpan: (node: ts.Node) => SourceLocation | undefined;
export declare const deriveIdentifierType: (node: ts.Identifier, ctx: ProgramContext) => IrType | undefined;
/**
 * Extract explicit type arguments from a call or new expression.
 *
 * DETERMINISTIC TYPING: Only returns type arguments that are explicitly
 * specified in the source code. Does NOT use TypeScript's type inference
 * to infer type arguments. For inferred type arguments, use expectedType
 * threading in the caller (Step 6 of deterministic typing).
 */
export declare const extractTypeArguments: (node: ts.CallExpression | ts.NewExpression, ctx: ProgramContext) => readonly IrType[] | undefined;
/**
 * Check if a call/new expression requires specialization
 * Returns true for conditional types, infer, variadic generics, this typing
 *
 * DETERMINISTIC: Uses Binding API to resolve signatures and extract declaration info.
 */
export declare const checkIfRequiresSpecialization: (node: ts.CallExpression | ts.NewExpression, ctx: ProgramContext) => boolean;
/**
 * Convert TypeScript binary operator token to string
 */
export declare const convertBinaryOperator: (token: ts.BinaryOperatorToken) => string;
/**
 * Check if a binary operator token is an assignment operator
 */
export declare const isAssignmentOperator: (token: ts.BinaryOperatorToken) => boolean;
/**
 * Get the contextual type for an expression from explicit TypeNodes.
 *
 * DETERMINISTIC TYPING: Only extracts types from explicit TypeNodes in the
 * source code. Does NOT use TypeScript's getContextualType (banned API).
 * Returns undefined if no explicit type annotation is found.
 *
 * For complete expectedType threading (covering all contexts), see Step 6
 * of deterministic typing implementation.
 */
export declare const getContextualType: (node: ts.Expression, ctx: ProgramContext) => IrType | undefined;
//# sourceMappingURL=helpers.d.ts.map