Hierarchy

  • Omit<LDClientBase, "identify">
    • LDClient

Properties

logger: LDLogger

Methods

  • Parameters

    Returns void

  • Returns LDFlagSet

  • Parameters

    • key: string
    • defaultValue: boolean

    Returns boolean

  • Parameters

    • key: string
    • defaultValue: boolean

    Returns LDEvaluationDetailTyped<boolean>

  • Returns Promise<void>

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

  • Returns undefined | LDContextStrict

  • Identifies a context to LaunchDarkly and returns a promise which resolves to an object containing the result of the identify operation.

    Unlike the server-side SDKs, the client-side Node.js SDK maintains a current context state, which is set when you call identify().

    Changing the current context also causes all feature flag values to be reloaded. Until that has finished, calls to variation methods will still return flag values for the previous context. You can await the Promise to determine when the new flag values are available.

    Use start to set the initial context at startup.

    Parameters

    Returns Promise<LDIdentifyResult>

    A promise which resolves to an object containing the result of the identify operation.

  • 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

    • key: string
    • callback: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]
            Rest

          Returns void

    Returns void

  • Parameters

    • key: string
    • callback: ((...args) => void)
        • (...args): void
        • Parameters

          • Rest ...args: any[]
            Rest

          Returns void

    Returns void

  • Sets the data source connection mode.

    Parameters

    Returns Promise<void>

    Remarks

    Switches between 'offline', 'streaming', and 'polling' at runtime without restarting the client. Use 'offline' to pause all LaunchDarkly network activity.

    See

    ConnectionMode

  • 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

    • key: string
    • Optional defaultValue: any
      Optional

    Returns any

  • Parameters

    • key: string
    • Optional defaultValue: any
      Optional

    Returns LDEvaluationDetail

Generated using TypeDoc