Construct a LaunchDarklyProvider.
The SDK key.
Any options for the SDK.
The maximum amount of time to wait for initialization in seconds. Defaults to 10 seconds. Zero does not wait, and 'forever' waits indefinitely.
ReadonlyeventsAn event emitter for ProviderEvents.
ReadonlymetadataReadonlyrunsRepresents where the provider is intended to be run. If defined, the SDK will enforce that the defined paradigm at runtime.
Returns the OpenFeature hooks registered for this provider. The LaunchDarkly provider does not currently register any provider-level hooks, so this always returns an empty array.
ProtectedemitEmit an OpenFeature ConfigurationChanged event for the given flag key. Per-SDK providers call this from their event wiring.
Get the LDClient instance used by this provider.
The client for this provider.
A function used to setup the provider. Called by the SDK after the provider is set if the provider's status is NOT_READY. When the returned promise resolves, the SDK fires the ProviderEvents.Ready event. If the returned promise rejects, the SDK fires the ProviderEvents.Error event. Use this function to perform any context-dependent setup within the provider.
Optionalcontext: EvaluationContext
the global evaluation context
A function used to shut down the provider. Called when this provider is replaced with a new one, or when the OpenFeature is shut down.
Determines the boolean variation of a feature flag for a context, along with information about how it was calculated.
If the flag does not evaluate to a boolean value, then the defaultValue will be returned.
The unique key of the feature flag.
The default value of the flag, to be used if the value is not available from LaunchDarkly.
The context requesting the flag. The client will generate an analytics event to register this context with LaunchDarkly if the context does not already exist.
A promise which will resolve to a ResolutionDetails.
Determines the numeric variation of a feature flag for a context, along with information about how it was calculated.
If the flag does not evaluate to a numeric value, then the defaultValue will be returned.
The unique key of the feature flag.
The default value of the flag, to be used if the value is not available from LaunchDarkly.
The context requesting the flag. The client will generate an analytics event to register this context with LaunchDarkly if the context does not already exist.
A promise which will resolve to a ResolutionDetails.
Determines the object variation of a feature flag for a context, along with information about how it was calculated.
If the flag does not evaluate to a JSON object value, then the defaultValue will be returned.
The unique key of the feature flag.
The default value of the flag, to be used if the value is not available from LaunchDarkly.
The context requesting the flag. The client will generate an analytics event to register this context with LaunchDarkly if the context does not already exist.
A promise which will resolve to a ResolutionDetails.
Determines the string variation of a feature flag for a context, along with information about how it was calculated.
If the flag does not evaluate to a string value, then the defaultValue will be returned.
The unique key of the feature flag.
The default value of the flag, to be used if the value is not available from LaunchDarkly.
The context requesting the flag. The client will generate an analytics event to register this context with LaunchDarkly if the context does not already exist.
A promise which will resolve to a ResolutionDetails.
ProtectedsetCalled by subclass constructors to register the LDClient instance.
ProtectedsetCalled by subclass constructors when client construction throws. The error will be re-thrown from initialize.
Track a user action or application state, usually representing a business objective or outcome.
OptionaltrackingEventDetails: TrackingEventDetails
An OpenFeature provider for the LaunchDarkly Server-Side SDK for Node.js.