Protectedtarget_Protectedlambda_Protected OptionallocalProtectedsyntaxProtectednameProtectedargsProtectedsetProtectedgetOptionalchecker: TypeCheckerReturns an array of expected parameters for this function, in order. Each parameter includes its expected type and whether it is optional. This is used for type checking and validation of function arguments.
an array of expected parameters for this function by type
Returns the return type of the function. The return type can be an atomic type or an array type. Array Lambda functions can also return object array type.
Optionalchecker: TypeCheckerOptional type checker to use for determining the return type.
Check the types of the expression using the provided type checker.
Optionalchecker: TypeCheckerthe type checker to use for validating the expression's types.
the result of the type check.
Evaluate the expression in the given context to compute its value. The implementation of this method will depend on the specific type of expression and how it computes its value based on the data in the context.
the current working context containing data and constants.
the computed value of the expression.
Get the original syntax string that was used to create this expression. This can be useful for debugging, logging, or error messages to provide context about where the expression came from.
the original syntax string of the expression.
What expressions comprise the expression for use in caching/memoization.
an array of expressions that can be cached/memoized.
What data keys are required for this expression to be evaluated? This information is used by the rule engine to determine the dependencies between expressions and rules, and to ensure that all necessary data is available before evaluating the expression.
a set of data keys required for this expression to be evaluated.
What functions are invoked by this expression? This information can be used for optimization, caching, or to determine which function nodes in the graph are relevant for this expression.
a set of function names invoked by this expression.
Check whether the function should convert any number of arguments into a single array argument for processing. By default this is not true. Functions that should convert arguments into an array for processing (e.g. sum, avg, concat) can override this method to indicate that they expect a parameter array.
boolean indicating whether the function expects a parameter array
Get a string representation of the expression, which can be used for debugging, logging, or error messages.
a string representation of the expression.
Get a JSON representation of the expression, which can be used for serialization, logging, or visualization.
a JSON representation of the expression.
Represents an expression that can be evaluated in a given context to produce a value. Expressions can be used in conditions, assignments, and other parts of the rule syntax to compute values based on the current state of the working context. Each expression must implement the required() method to specify which data keys it depends on, and the evaluate() method to compute its value based on the context.