@neutrium/quantity - v7.1.0
    Preparing search index...

    Interface CompiledExpression<T>

    A parsed and bound instruction sequence. Evaluation never reparses the source.

    interface CompiledExpression<T> {
        ast: ExpressionNode;
        source: string;
        variables: readonly string[];
        evaluate(bindings?: Readonly<Record<string, NumericInput<T>>>): T;
        tryEvaluate(
            bindings?: Readonly<Record<string, NumericInput<T>>>,
        ): ExpressionResult<T>;
    }

    Type Parameters

    • T
    Index
    source: string
    variables: readonly string[]

    Distinct required variables, in order of first occurrence.

    • Parameters

      • Optionalbindings: Readonly<Record<string, NumericInput<T>>>

      Returns T

    • Parameters

      • Optionalbindings: Readonly<Record<string, NumericInput<T>>>

      Returns ExpressionResult<T>