Create a new instance of FunctionRegistry.
Optionaloptions: Partial<WorkspaceOptions>Optional workspace options to configure the behavior of the function registry.
Set or update the options for the registry.
an object containing the options to set or update.
Check if a function with the given name exists in the registry.
The name of the function to check.
True if the function exists, false otherwise.
Retrieve a function definition by its name.
The name of the function to retrieve.
The function definition if found, undefined otherwise.
Add a function definition to the registry.
The function definition to add.
Add multiple function definitions to the registry.
The function definitions to add, can be a Map, Record, or array.
Retrieve all function definitions stored in the registry.
A record of all function definitions, keyed by their names.
Retrieve all function definitions that have a specific annotation and optional value.
The annotation to filter functions by.
Optionalvalue: anyThe optional value of the annotation to match.
A record of function definitions that match the annotation and value, keyed by their names.
Perform type checking on all function definitions in the registry using the provided type checker. This method iterates through each function definition, checks its types against the type checker, and returns an array of validation results.
N.B. Disabled functions are skipped during type checking, as they are not intended to be used in rule evaluation and may contain incomplete or invalid definitions.
The type checker to use for validating function definitions.
An array of validation results for each function definition.
ProtectedcheckClear all function definitions from the registry.
FunctionRegistry is responsible for storing and managing function definitions within the working context. It allows adding, retrieving, and checking for the existence of function definitions. This registry is used during rule evaluation to resolve function calls and validate their usage against defined function signatures.