import { FunctionExpression, Expression, Descriptor } from '../state/index.js'; import { ErrorResult } from './utils.js'; export type FormattingResult = Expression | ErrorResult; export type FormatFunction = (AST: Expression, optionalParams: unknown) => FormattingResult; export interface AtxFunc { returnType: string[]; inputTypes: string[][]; f?: unknown; variableParameterAmount?: boolean; isAggregate?: boolean; } /** * Convert the given operator into the name of the corresponding function. */ export declare function _getOperationOperatorFuncName(func: FunctionExpression): string | null; /** * Format the given AST. Such as replacing operators with the corresponding * function names, making sure the supplied parameters are valid, or adding * the return typeof the expression. * To do so, iterate over each scope of the AST, and chain the * formatting functions on the current scope. * If one of the adjustment functions returns an error, stop the chain and * return the error. * Finally, make sure the expression's return type matches the authorized return types. */ export declare function format(expression: Expression, descriptor: Descriptor): FormattingResult;