API reference: @salmonui/pivot-table/engine
compileFormulafunction
import { compileFormula } from '@salmonui/pivot-table/engine';Also exported from @salmonui/pivot-table/engine/formula.
function compileFormula(formula: string, fields?: readonly string[]): CompiledFormula;
Compiles a calculated field formula. fields are the source field names a
reference may name (an empty list accepts any field). Throws
PivotFormulaError with the offending position.