Skip to main content
Version: Next

FeatureFlagDefinition

FeatureFlagDefinition

Definition for a feature flag, including its key, description, identify function, and decide function. The identify function is used to determine the entities that will be evaluated against the feature flag, while the decide function contains the logic for determining the outcome of the flag based on those entities.

PropertyTypeValueDescription
decideDecideFunction<Entity, R>N/AFunction to decide the outcome of the feature flag. This function receives the identified entities and should return the result of the decision.
descriptionstringN/AOptional description of the feature flag. This can be used for documentation or debugging purposes.
disableAnalyticsbooleanN/AWhether to disable analytics tracking for this flag. Default: false
identifyIdentifyFunction<Entity>N/AOptional flag to enable integration with an external flag provider. If true, the flag will use the global flag provider to determine its state. Default: false
keystringN/AUnique key for the feature flag. Should be a string that identifies the flag.