FeatureFlag

Hierarchy

  • FeatureFlag

Index

Properties

enabled

enabled: boolean

Indicates whether or not this feature flag is enabled.

id

id: string

The ID for this feature flag.

properties

properties: PropertiesJson

Properties of this object.

Avoid accessing these properties directly. Instead, prefer using the getStringProperty, getBooleanProperty, getNumberProperty, getImageProperty and getJsonProperty methods which ensure type safety and to avoid breaking changes in the future.

Methods

getBooleanProperty

  • getBooleanProperty(key: string): boolean | null
  • Get value of a property of type boolean.

    Parameters

    • key: string

      The key of the property.

    Returns boolean | null

    The value of the property if the key is found and is of type boolean. If the key is not found or if there is a type mismatch, this method will return a null.

getImageProperty

  • getImageProperty(key: string): string | null
  • Get value of a property of type image.

    Parameters

    • key: string

      The key of the property.

    Returns string | null

    The string value of the image url if the key is found and is of type image. If the key is not found or if there is a type mismatch, this method will return a null.

getJsonProperty

  • Get value of a property of type JSON.

    Parameters

    • key: string

      The key of the property.

    Returns JsonPropertyValue | null

    The value of the property if the key is found and is of type JSON. If the key is not found or if there is a type mismatch, this method will return a null.

getNumberProperty

  • getNumberProperty(key: string): number | null
  • Get value of a property of type number.

    Parameters

    • key: string

      The key of the property.

    Returns number | null

    The value of the property if the key is found and is of type number. If the key is not found or if there is a type mismatch, this method will return a null.

getStringProperty

  • getStringProperty(key: string): string | null
  • Get value of a property of type string.

    Parameters

    • key: string

      The key of the property.

    Returns string | null

    The value of the property if the key is found and is of type string. If the key is not found or if there is a type mismatch, this method will return a null.

getTimestampProperty

  • getTimestampProperty(key: string): number | null
  • Get value of a property of type datetime as a Unix timestamp (milliseconds).

    Parameters

    • key: string

      The key of the property.

    Returns number | null

    The Unix timestamp (milliseconds) value of the property if the key is found and is of type datetime. If the key is not found or if there is a type mismatch, this method will return a null.