/** * Built-in formula functions and the per-evaluation function registry (F1). * * A {@link FormulaFn} receives its arguments already evaluated and with ranges * flattened into the value list (the evaluator does the expansion), so a custom * function is just `(args) => value`. Numeric functions skip non-numeric values * (matching the aggregation engine) but propagate error values, the spreadsheet * convention. `IF` is not here: the evaluator handles it directly so it can * short-circuit (only the taken branch is evaluated). * * Pure: no DOM, no grid knowledge. */ import { type CellValue, type FormulaError } from './errors.js'; /** A formula function: evaluated arguments in (ranges already flattened), a value out. */ export type FormulaFn = (args: CellValue[]) => CellValue; /** * Create a fresh function registry seeded with the v1 built-ins, keyed by * upper-case name. Each grid owns its own registry so `registerFormulaFunction` * adds custom functions without leaking across instances. `IF` is intentionally * absent: the evaluator implements it for short-circuit semantics. */ export declare function createFunctionRegistry(): Map; /** The names of the built-in functions (upper-case), for documentation/tests. */ export declare const BUILTIN_FUNCTION_NAMES: readonly string[]; export type { FormulaError };