Private
constructorPrivate
_contextPrivate
_hooksPrivate
_loggerPrivate
_providerPrivate
_transactionClears all the hooks that are registered on this receiver.
The receiver (this object)
A factory function for creating new OpenFeature clients. Clients can contain their own state (e.g. logger, hook, context). Multiple clients can be used to segment feature flag configuration.
OpenFeature Client
Optional
name: stringThe name of the client
Optional
version: stringThe version of the client
Optional
context: EvaluationContextEvaluation context that should be set on the client to used during flag evaluations
Access the evaluation context set on the receiver.
Evaluation context
Experimental
EXPERIMENTAL: Transaction context propagation is experimental and subject to change. The OpenFeature Enhancement Proposal regarding transaction context can be found here.
Returns the currently defined transaction context using the registered transaction context propagator.
The current transaction context
Sets evaluation context that will be used during flag evaluations on this receiver.
The receiver (this object)
Evaluation context
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.
The receiver (this object)
The logger to be used
Sets the provider that OpenFeature will use for flag evaluations. Setting a provider supersedes the current provider used in new and existing clients.
OpenFeature API
The provider responsible for flag evaluations.
Experimental
EXPERIMENTAL: Transaction context propagation is experimental and subject to change. The OpenFeature Enhancement Proposal regarding transaction context can be found here.
Sets the transaction context using the registered transaction context propagator.
The return value of the callback
The transaction specific context
Callback function used to set the transaction context on the stack
Rest
...args: unknown[]Rest
...args: unknown[]Optional arguments that are passed to the callback function
Experimental
EXPERIMENTAL: Transaction context propagation is experimental and subject to change. The OpenFeature Enhancement Proposal regarding transaction context can be found here.
Sets a transaction context propagator on this receiver. The transaction context propagator is responsible for persisting context for the duration of a single transaction.
The receiver (this object)
The context propagator to be used
Generated using TypeDoc
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)