SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Class Registry<T>

    Registry for managing items by key.

    Provides registration and lookup by name. Pre-populated with built-ins. Supports custom registration for extensibility.

    Type Parameters

    Index
    • Get an operator or selector by name.

      Parameters

      • name: string

        The name of the operator or selector (e.g., "greaterThan", "wholeNumber").

      Returns T | undefined

      The operator/selector instance, or undefined if not found.

      Used for deserialization and runtime lookup by string name.

      const selector = Condition.Selectors.get('wholeNumber');
      const operator = Condition.Operators.get('greaterThan');
    • Get all registered operators or selectors.

      Returns T[]

      Array of all registered items.

      Useful for populating UI dropdowns or iterating over all available options.

    • Check if an operator or selector is registered.

      Parameters

      • name: string

        The name to check.

      Returns boolean

      true if registered, false otherwise.

    • Register a custom operator or selector.

      Parameters

      • item: T

        The operator or selector to register.

      Returns void

      Overwrites any existing registration with the same name. Use this to add custom operators/selectors or override built-ins.

      const customOperator: ICondition.IOperator = {
      getName: () => 'myCustomOperator',
      createPredicate: (criteria, ctx) => (value) => value > 100
      };
      Condition.Operators.register(customOperator);