/**
 * Call resolution helpers
 *
 * Contains callable-candidate resolution, overload scoring, and
 * getDeclaredReturnType for call/new expressions.
 *
 * ALICE'S SPEC: All call resolution goes through TypeSystem.resolveCall().
 * NO FALLBACKS ALLOWED. If TypeSystem can't resolve, return unknownType.
 */
import * as ts from "typescript";
import { IrCallExpression } from "../../../types.js";
import { IrType } from "../../../types.js";
import type { ProgramContext } from "../../../program-context.js";
import type { ResolvedCall } from "../../../type-system/type-system.js";
export declare const flattenCallableCandidates: (type: IrType | undefined, ctx: ProgramContext) => readonly Extract<IrType, {
    kind: "functionType";
}>[];
export declare const countRequiredParameters: (type: Extract<IrType, {
    kind: "functionType";
}>) => number;
export declare const canAcceptArgumentCount: (type: Extract<IrType, {
    kind: "functionType";
}>, argumentCount: number) => boolean;
export declare const collectResolutionArguments: (args: readonly IrCallExpression["arguments"][number][]) => {
    readonly argumentCount: number;
    readonly argTypes: readonly (IrType | undefined)[];
};
export declare const scoreCallableCandidate: (type: Extract<IrType, {
    kind: "functionType";
}>, argumentCount: number) => readonly [number, number, number, number];
export declare const compareCallableScores: (left: readonly [number, number, number, number], right: readonly [number, number, number, number]) => number;
export declare const chooseCallableCandidate: (type: IrType | undefined, argumentCount: number, ctx: ProgramContext, argTypes?: readonly (IrType | undefined)[]) => Extract<IrType, {
    kind: "functionType";
}> | undefined;
export declare const resolveCallableCandidate: (type: IrType | undefined, argumentCount: number, ctx: ProgramContext, argTypes?: readonly (IrType | undefined)[], explicitTypeArgs?: readonly IrType[], expectedReturnType?: IrType) => {
    readonly callableType: Extract<IrType, {
        kind: "functionType";
    }> | undefined;
    readonly resolved: ResolvedCall | undefined;
};
/**
 * Walk a property access chain and build a qualified name.
 * For `Foo.Bar.Baz`, returns "Foo.Bar.Baz" by walking the AST identifiers.
 * This avoids getText() which bakes source formatting into type identity.
 */
export declare const buildQualifiedName: (expr: ts.Expression) => string | undefined;
export declare const unwrapExpr: (expr: ts.Expression) => ts.Expression;
export declare const isArrayNamespaceExpression: (expr: ts.Expression) => boolean;
export declare const isArrayIsArrayCall: (expr: ts.Expression) => boolean;
/**
 * Get the declared return type from a call or new expression's signature.
 *
 * ALICE'S SPEC: Uses TypeSystem.resolveCall() EXCLUSIVELY.
 * NO FALLBACKS. If TypeSystem can't resolve, return unknownType.
 * This ensures any missing TypeSystem functionality surfaces as test failures.
 */
export declare const getDeclaredReturnType: (node: ts.CallExpression | ts.NewExpression, ctx: ProgramContext, receiverIrType?: IrType) => IrType | undefined;
//# sourceMappingURL=call-resolution.d.ts.map