Hierarchy

Implements

  • LDClient

Constructors

  • Creates the client object synchronously. No async, no network calls.

    Parameters

    Returns LDClientImpl

Properties

autoEnvAttributes: AutoEnvAttributes
clientContext: any
config: default
context?: LDContext
createIdentifyPromise: any
createStreamListeners: any
diagnosticsManager?: DiagnosticsManager
emitter: any
eventFactoryDefault: any
eventFactoryWithReasons: any
eventProcessor?: EventProcessor
flags: any
getFlagsFromStorage: any
highTimeoutThreshold: number
identifyTimeout: number
logger: LDLogger
onIdentifyResolve: any

Performs common tasks when resolving the identify promise:

  • resolve the promise
  • update in memory context
  • update in memory flags
  • emit change event if needed

Param

Param

Param

Param

For logging purposes

platform: Platform
sdkKey: string
typedEval: any
variationInternal: any

Methods

  • Returns LDFlagSet

  • Parameters

    • key: string
    • defaultValue: boolean

    Returns boolean

  • Parameters

    • key: string
    • defaultValue: boolean

    Returns LDEvaluationDetailTyped<boolean>

  • Returns Promise<void>

  • Protected

    Generates the url path for streamer.

    For mobile key: /meval/${base64-encoded-context} For clientSideId: /eval/${envId}/${base64-encoded-context}

    the path.

    This function must be overridden in subclasses for streamer to work.

    Parameters

    Returns string

  • Returns Promise<{
        error?: Error;
        result: boolean;
    }>

  • Gets the SDK connection mode.

    Returns ConnectionMode

  • Returns undefined | LDContext

  • Identifies a context to LaunchDarkly. See LDClient.identify.

    Parameters

    • pristineContext: LDContext

      The LDContext object to be identified.

    • Optional identifyOptions: LDIdentifyOptions

      Optional configuration. See LDIdentifyOptions.

      Optional

    Returns Promise<void>

    A Promise which resolves when the flag values for the specified context are available. It rejects when:

    1. The context is unspecified or has no key.

    2. The identify timeout is exceeded. In client SDKs this defaults to 5s. You can customize this timeout with LDIdentifyOptions | identifyOptions.

    3. A network error is encountered during initialization.

  • Returns boolean

  • Parameters

    • key: string
    • defaultValue: unknown

    Returns unknown

  • Parameters

    • key: string
    • defaultValue: unknown

    Returns LDEvaluationDetailTyped<unknown>

  • Parameters

    • key: string
    • defaultValue: number

    Returns number

  • Parameters

    • key: string
    • defaultValue: number

    Returns LDEvaluationDetailTyped<number>

  • Parameters

    • eventName: EventName
    • listener: Function

    Returns void

  • Parameters

    • eventName: EventName
    • listener: Function

    Returns void

  • Sets the SDK connection mode.

    Parameters

    Returns Promise<void>

  • Parameters

    • key: string
    • defaultValue: string

    Returns string

  • Parameters

    • key: string
    • defaultValue: string

    Returns LDEvaluationDetailTyped<string>

  • Parameters

    • key: string
    • Optional data: any
      Optional
    • Optional metricValue: number
      Optional

    Returns void

  • Parameters

    • flagKey: string
    • Optional defaultValue: any
      Optional

    Returns any

  • Parameters

    • flagKey: string
    • Optional defaultValue: any
      Optional

    Returns LDEvaluationDetail

Generated using TypeDoc