Interface Client

Hierarchy

Properties

metadata: ClientMetadata

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.

    Returns

    The receiver (this object)

    Parameters

    • Rest ...hooks: Hook<FlagValue>[]

      A list of hooks that should always run

    Returns Client

  • Clears all the hooks that are registered on this receiver.

    Returns

    The receiver (this object)

    Returns Client

  • Performs a flag evaluation that returns a boolean.

    Returns

    Flag evaluation response

    Parameters

    • flagKey: string

      The flag key uniquely identifies a particular flag

    • defaultValue: boolean

      The value returned if an error occurs

    • Optional context: EvaluationContext

      The evaluation context used on an individual flag evaluation

    • Optional options: FlagEvaluationOptions

      Additional flag evaluation options

    Returns Promise<boolean>

  • Access all the hooks that are registered on this receiver.

    Returns

    A list of the client hooks

    Returns Hook<FlagValue>[]

  • Sets a logger on this receiver. This logger supersedes to the global logger and is passed to various components in the SDK. The logger configured on the global API object will be used for all evaluations, unless overridden in a particular client.

    Returns

    The receiver (this object)

    Parameters

    • logger: Logger

      The logger to be used

    Returns Client

Generated using TypeDoc