Condition<T>: {
    evaluate: ((subject: T, params?: unknown) => boolean);
    id: string;
    type: string;
}

This interface defines callbacks intended to be registered to the Condition registry

Type Parameters

  • T = unknown

Type declaration

  • evaluate: ((subject: T, params?: unknown) => boolean)
      • (subject: T, params?: unknown): boolean
      • The evaluation function relating to this condition, serves the role of a predicate

        Throws

        may throw an error if the second argument has an unexpected type

        Parameters

        • subject: T

          some value depending on the condition type to evaluate the condition for, such as the current limeobject

        • Optional params: unknown

          any additional data that this condition may expect, such as configuration data from an action visibility condition

        Returns boolean

  • id: string
  • type: string

    The condition type, describing what to evaluate the condition for, for example "limeobject"