Contains the configuration info of a specific feature. Note: These configurations are received from the server, and are not configurable by the client.

interface FeatureConfig {
    get isEnabled(): boolean;
    get name(): string;
    getAllProperties(): Readonly<Record<string, string>>;
    getAllSubFeatures(): Readonly<FeatureConfig>[];
    getProperty(propertyName: string): undefined | string;
    getSubFeature(featureName: string): undefined | Readonly<FeatureConfig>;
    hasProperty(propertyName: string): boolean;
    hasSubFeature(featureName: string): boolean;
}

Accessors

  • get isEnabled(): boolean
  • Indicates whether the feature is enabled or not.

    Returns boolean

  • get name(): string
  • The name of the feature whose configuration is being represented.

    Returns string

Methods

  • Retrieves all properties defined for this feature.

    Returns Readonly<Record<string, string>>

    An object containing all properties of the feature, where keys are property names and values are their corresponding raw values.

  • Retrieve configurations for all sub-features of this feature.

    Returns Readonly<FeatureConfig>[]

    A list of all sub-feature configurations for this feature.

  • Retrieves the value of the specified property for this feature if it exists.

    Parameters

    • propertyName: string

      The name of the property to retrieve.

    Returns undefined | string

    The raw value of the property if it exists, otherwise undefined.

  • Retrieve configurations for specified sub-feature if it exists.

    Parameters

    • featureName: string

    Returns undefined | Readonly<FeatureConfig>

    The configuration for the sub-feature if it exists, otherwise undefined.

  • Checks if this feature has a specific property defined.

    Parameters

    • propertyName: string

      The name of the property to check.

    Returns boolean

    true if the property exists, otherwise false.

  • Check if this feature has a sub-feature with the provided name.

    Parameters

    • featureName: string

    Returns boolean

    true if the sub-feature exists, otherwise false.