Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ export type Enabled = boolean;
* A default environment value for the feature. If the feature is multivariate, this will be the control value.
*/
export type Value2 = string | number | boolean | null;
/**
* A stable, human-readable identifier for the variant. Omitted when the variant has no key set.
*/
export type Key4 = string;
/**
* The value of the feature.
*/
Expand Down Expand Up @@ -222,6 +226,7 @@ export interface FeatureContext {
* Represents a multivariate value for a feature flag.
*/
export interface FeatureValue {
key?: Key4;
value: Value3;
weight: Weight;
priority: VariantPriority;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ export type Value = string | number | boolean | null;
* Reason for the feature flag evaluation.
*/
export type Reason = string;
/**
* A stable identifier of the multivariate variant the identity was bucketed into: the variant's key, "control" for the control bucket, or null when no multivariate split applied (a standard feature, an unkeyed variant, or evaluation without an identity).
*/
export type Variant = string | null;
/**
* Segment name.
*/
Expand Down Expand Up @@ -49,6 +53,7 @@ export interface FlagResult {
enabled: Enabled;
value: Value;
reason: Reason;
variant: Variant;
metadata?: FeatureMetadata;
[k: string]: unknown;
}
Expand Down
Loading
Loading