mingo
    Preparing search index...

    Function useOperators

    • Registers a set of operators for a specific operator type.

      This function validates the provided operators to ensure that each operator name is valid and its corresponding function is a valid operator function. It also ensures that an operator cannot be redefined once it has been registered.

      Parameters

      • type: OpType

        The type of operators to register (e.g., aggregation, query, etc.).

      • operators: Record<string, Operator>

        A record of operator names and their corresponding functions.

      Returns void

      Will throw an error if:

      • An operator name is invalid.
      • An operator function is not valid.
      • An operator with the same name is already registered for the given type and the function differs from the existing one.