Service for adding and retrieving, and checking Conditions to and from the condition registry

Hierarchy

  • ConditionRegistry

Methods

  • Add a Condition to the registry

    Throws

    error if the id already exists in the registry

    Parameters

    • condition: Condition<unknown>

      the condition to pass to the registry

    Returns any

  • Gets a Condition by id

    Throws

    error if no condition was found with the specified id

    Returns

    the condition with the specified id

    Parameters

    • id: string

      id of the condition

    Returns Condition<unknown>

  • Checks if a Condition exists on the registry

    Returns

    true if it exists, false otherwise

    Parameters

    • id: string

      id of the condition

    Returns boolean

  • Remove a Condition from the registry

    Throws

    error if the id does not exist in the registry

    Parameters

    • condition: Condition<unknown>

      the condition to remove

    Returns any