import { FeatureFlagKey } from './feature-flag'; /** * Feature flag controller to manage feature flags. * * @class FeatureFlag * @property {Set} enabledFeatureFlagKeySet - Set of feature flags that are enabled. */ declare class FeatureFlagController { private readonly enabledFeatureFlagKeySet; /** * During constructor, It enables all the feature flags given by {@link FeatureFlagsMap} expect default disabled flags. */ constructor(); /** * This function enables the feature flags with the given keys. * * @param {FeatureFlagKey[]} featureFlagKeys - The feature flags to enable. * @vegaVersion 1.3.0 */ enable(...featureFlagKeys: FeatureFlagKey[]): void; /** * Disable the feature flags with the given keys. * * @param {FeatureFlagKey[]} featureFlagKeys - The feature flags to disable. * @vegaVersion 1.3.0 */ disable(...featureFlagKeys: FeatureFlagKey[]): void; /** * If the feature flag key is in the set of enabled feature flag keys, then return true, otherwise return false. * * @param {FeatureFlagKey} featureFlagKey - The feature flag key to check. * @returns {boolean} - True if the feature flag key is in the set of enabled feature flag keys, otherwise false. * @vegaVersion 1.3.0 */ isEnabled(featureFlagKey: FeatureFlagKey): boolean; /** * The `init` function initializes a set of enabled feature flags based on a map of feature flags, * excluding those disabled by default or removed. */ private init; /** * Verify if the flag is valid * * @param {FeatureFlagKey} featureFlagKey - the feature flag key * @returns {boolean} return false and console error if the feature flag is removedAfterVersion is not empty */ private versionGuard; /** * Verify if the flag is removed or not * * @param {FeatureFlagKey} featureFlagKey - the feature flag key * @returns {boolean} return true if the feature flag removedAfterVersion is not empty */ private isRemoved; /** * The function sends a feature flag key and its value to telemetry if a specific feature flag is * enabled. * * @param {FeatureFlagKey} featureFlagName - The `featureFlagName` parameter is a key that represents * a specific feature flag. It is used to identify and reference a particular feature * flag when checking its status or sending telemetry data related to it. * @param {boolean} featureFlagValue - The `featureFlagValue` parameter is a boolean value that * represents the value of a feature flag. It indicates whether the feature flag is enabled (`true`) * or disabled (`false`). */ private sendFeatureFlagKeyToTelemetry; /** * The function `canSendFeatureFlagsToTelemetry` checks if a specific feature flag can be sent to * telemetry based on certain conditions. * * @param {FeatureFlagKey} featureFlagName - The `featureFlagName` parameter represents the key or * identifier of a feature flag. It is used to look up the corresponding feature flag in the * `FeatureFlagsMap` object. * @param {boolean} featureFlagValue - The `featureFlagValue` parameter in the * `canSendFeatureFlagsToTelemetry` function represents the value of a specific feature flag. It is a * boolean value that indicates whether the feature flag is enabled (`true`) or disabled (`false`). * @returns {boolean} The function `canSendFeatureFlagsToTelemetry` is returning a boolean value. */ private canSendFeatureFlagsToTelemetry; } export declare const FeatureFlag: FeatureFlagController; export {};