The LaunchDarkly client interface for Vue.

Extends the base LDClient with initialization-status and context-change subscriptions that the Vue provider and composables use to react to start() and identify().

Hierarchy

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

  • Returns the initialization state of the client. Useful to determine whether the client can be used to evaluate flags on initial render.

    Returns "initializing" | "failed" | "timeout" | "complete"

  • Returns whether the client is ready to evaluate flags. True once initialization has completed (successfully or not), or when bootstrap data was provided.

    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

    • 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

  • Subscribes to context changes triggered by identify(). The callback is invoked after each successful identify() call (and once after a successful start()) with the resolved context.

    Parameters

    • callback: ((context) => void)

    Returns (() => void)

    An unsubscribe function.

      • (): void
      • Subscribes to context changes triggered by identify(). The callback is invoked after each successful identify() call (and once after a successful start()) with the resolved context.

        Returns void

        An unsubscribe function.

  • Subscribes to initialization status changes. The callback fires when start() resolves. If the client has already resolved, the callback is invoked immediately with the cached result.

    Parameters

    Returns (() => void)

    An unsubscribe function.

      • (): void
      • Subscribes to initialization status changes. The callback fires when start() resolves. If the client has already resolved, the callback is invoked immediately with the cached result.

        Returns void

        An unsubscribe function.

  • Sets the connection mode for the SDK's data system.

    When set, this mode is used exclusively, overriding all automatic mode selection (including setStreaming). The setStreaming state is not modified -- setConnectionMode acts as a higher-priority override.

    Pass undefined (or call with no arguments) to clear the override and return to automatic mode selection.

    This method requires the FDv2 data system (dataSystem option). If FDv2 is not enabled, the call logs a warning and has no effect.

    This method is not stable, and not subject to any backwards compatibility guarantees or semantic versioning. It is in early access. If you want access to this feature please join the EAP. https://launchdarkly.com/docs/sdk/features/data-saving-mode

    Parameters

    • Optional mode: FDv2ConnectionMode

      The connection mode to use, or undefined to clear the override.

      Optional

    Returns void

  • Specifies whether or not to open a streaming connection to LaunchDarkly for live flag updates.

    If this is true, the client will always attempt to maintain a streaming connection; if false, it never will. If you leave the value undefined (the default), the client will open a streaming connection if you subscribe to "change" or "change:flag-key" events (see LDClient.on).

    This can also be set as the streaming property of LDOptions.

    Parameters

    • Optional streaming: boolean
      Optional

    Returns 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

    • key: string
    • Optional defaultValue: any
      Optional

    Returns any

  • Parameters

    • key: string
    • Optional defaultValue: any
      Optional

    Returns LDEvaluationDetail

  • Parameters

    • Optional options: LDWaitForInitializationOptions
      Optional

    Returns Promise<LDWaitForInitializationResult>

Generated using TypeDoc