Options
All
  • Public
  • Public/Protected
  • All
Menu

An object that contains the state of all feature flags, generated by the LDElectronMainClient.allFlagsState method.

Hierarchy

  • LDFlagsState

Index

Properties

valid

valid: boolean

True if this object contains a valid snapshot of feature flag state, or false if the state could not be computed (for instance, because the client was offline or there was no user).

Methods

allValues

  • Returns a map of feature flag keys to values. If a flag would have evaluated to the default value, its value will be null.

    Do not use this method if you are passing data to the front end to "bootstrap" the JavaScript client. Instead, use toJSON.

    Returns LDFlagSet

getFlagReason

  • Returns the evaluation reason for a feature flag at the time the state was recorded. It will be null if reasons were not recorded, or if there was no such flag.

    Parameters

    • key: string

      The flag key.

    Returns LDEvaluationReason

getFlagValue

  • Returns the value of an individual feature flag at the time the state was recorded. It will be null if the flag returned the default value, or if there was no such flag.

    Parameters

    • key: string

      The flag key.

    Returns LDFlagValue

toJSON

  • toJSON(): object
  • Returns a Javascript representation of the entire state map, in the format used by the Javascript browser SDK. Use this method if you are passing data to the front end in order to "bootstrap" the JavaScript client.

    Do not rely on the exact shape of this data, as it may change in future to support the needs of the JavaScript client.

    Returns object

Generated using TypeDoc