Type alias FormulaFunction

FormulaFunction: ((...args) => unknown)

Type declaration

    • (...args): unknown
    • An own function for formulas. It gets the evaluated arguments (never an error – an error argument is returned without calling the function) and returns a number, text, boolean or null. Anything else, an exception or NaN becomes #VALUE! resp. #NUM!.

      Parameters

      Returns unknown

      Example

      const VAT: FormulaFunction = (net) => Number(net) * 0.19;
      compileFormula("VAT([price])", { functions: { VAT } });

      Since

      1.1.95