FeatureFlagManager

FeatureFlagManager

Interface for determining feature flag eligibility.

Members

get :Promise.<FeatureFlag>

Retrieve a given flag's status and associated data by its name.

Type:
Example
const flag = await sdk.components.featureFlags.get("my_flag")
if (flag.eligible) {
  // ...
}

trackInteraction :Promise.<void>

Track that a user has interacted with the feature that is associated with a given flag.

Type:
  • Promise.<void>
Example
const flag = await sdk.components.featureFlags.get("my_flag")
// later when the user interacts with the feature
await sdk.components.featureFlags.trackInteraction(flag)