Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "launchdarkly-electron-client-sdk"

This is the API reference for the LaunchDarkly SDK for Electron.

In typical usage, you will call initializeInMain in the main process at startup time to obtain an instance of LDElectronMainClient-- and, optionally, call initializeInRenderer in a renderer process to obtain a corresponding instance of LDElectronRendererClient.

For more information, see the SDK reference guide.

Index

Type aliases

LDFlagValue

LDFlagValue: any

The types of values a feature flag can have.

Flags can have any JSON-serializable value.

Variables

Const version

version: string

The current version string of the SDK.

Functions

createConsoleLogger

  • createConsoleLogger(minimumLevel: string): LDLogger
  • A basic implementation of logging that uses the global console object. This is used by default in the browser SDK. It sends messages of "debug", "info", "warn", or "error" level (if enable) to console.log(), console.info(), console.warn(), and console.error() respectively.

    To make LDClient use this logger, put it in the logger property of LDOptions.

    Parameters

    • minimumLevel: string

    Returns LDLogger

createNodeSdkAdapter

initializeInMain

  • Creates an instance of the LaunchDarkly Electron client to be used in the main process.

    Parameters

    Returns LDElectronMainClient

initializeInRenderer

  • Creates an instance of the LaunchDarkly Electron client to be used in a renderer process, which will receive all of its state from a client in the main process.

    Parameters

    • Optional envKey: undefined | string

      The LaunchDarkly environment ID. This can usually be omitted because it can be obtained from the LDElectronMainClient instance in the main process. You only need to specify it here if there are multiple client instances with different environment IDs.

    • Optional options: LDOptions

      Optional configuration settings. Since the main process client controls all communication with LaunchDarkly, the only options that can actually be set for the renderer client are the ones that control event generation: sendEvents, allAttributesPrivate, privateAttributeNames, allowFrequentDuplicateEvents, and sendEventsOnlyForVariation.

    Returns LDElectronRendererClient

Generated using TypeDoc