import { ExpressionValue } from "../../value/ExpressionValue.js";
import { FuncArg } from "./FuncArg.js";
import { ExprEvalError, ExprEvalResult } from "../ExprEvalResult.js";
import { ExprType } from "../../type/ExprType.js";
import { ParserRuleContext } from "antlr4";
import { FunctionExpr } from "./FunctionExpr.js";
import { Expr } from "../Expr.js";
export declare abstract class Func {
    protected name: string;
    protected formalArguments: Array<FuncArg<unknown>>;
    protected constructor(name: string, args: Array<FuncArg<unknown>>);
    abstract getReturnType(argumentTypes: Array<ExprType>): ExprType;
    checkArgumentsAndGetReturnType(argumentTypes: Array<[ParserRuleContext, ExprType]>, ctx: any): ExprType;
    protected checkArgumentTypes(providedArgumentTypes: Array<[ParserRuleContext, ExprType]>, ctx: any): void;
    getName(): string;
    evaluate(callingExpr: FunctionExpr, funcArgs: Array<ExprEvalResult<ExpressionValue>>): ExprEvalResult<ExpressionValue>;
    /**
     * Subclasses must provide the funcation evaluation code here.
     * @param evaluatedArguments
     * @protected
     */
    protected abstract calculateResult(callingExpr: FunctionExpr, evaluatedArguments: Map<string, ExpressionValue>): ExprEvalResult<ExpressionValue>;
    /**
     * Override to transform individual arguments if needed. After this step, if any of the ExprEvalResult objects in the
     * returned array is an ExprEvalError, the function evaluation fails.
     * @param evaluatedArguments
     * @protected
     */
    protected transformArguments(callingExpr: Expr<any>, evaluatedArguments: Map<string, ExprEvalResult<ExpressionValue>>): void;
    /**
     * Gets the argument values from the list of provided arguments in the form of 'name' -> ExprEvalResult (which may contain errors).
     * Generates an error if a required value is missing.
     * @param provided
     * @protected
     */
    protected getArgumentValues(callingExpr: FunctionExpr, provided: Array<ExprEvalResult<ExpressionValue>>): Map<string, ExprEvalResult<ExpressionValue>> | ExprEvalError;
    private checkArgs;
}
