interface EvaluationLifeCycle<T> {
    addHooks(...hooks: BaseHook<FlagValue, unknown, unknown>[]): T;
    clearHooks(): T;
    getHooks(): BaseHook<FlagValue, unknown, unknown>[];
}

Type Parameters

  • T

Implemented by

Methods

  • Adds hooks that will run during flag evaluations on this receiver. Hooks are executed in the order they were registered. Adding additional hooks will not remove existing hooks. Hooks registered on the global API object run with all evaluations. Hooks registered on the client run with all evaluations on that client.

    Parameters

    • Rest...hooks: BaseHook<FlagValue, unknown, unknown>[]

      A list of hooks that should always run

    Returns T

    The receiver (this object)