Interface LDDebugOverrideExperimental

Debug interface for plugins that need to override flag values during development. This interface provides methods to temporarily override flag values that take precedence over the actual flag values from LaunchDarkly. These overrides are useful for testing, development, and debugging scenarios.

This interface is experimental and intended for use by LaunchDarkly tools at this time. The API may change in future versions.

interface LDDebugOverride {
    clearAllOverrides(): void;
    getAllOverrides(): LDFlagSet;
    removeOverride(flagKey: string): void;
    setOverride(flagKey: string, value: any): void;
}

Methods

  • Experimental

    Clear all override values, reverting all flags to their real values.

    Returns void

  • Experimental

    Get all currently active flag overrides.

    Returns LDFlagSet

    An object containing all active overrides as key-value pairs, where keys are flag keys and values are the overridden flag values. Returns an empty object if no overrides are active.

  • Experimental

    Remove an override value for a flag, reverting to the real flag value.

    Parameters

    • flagKey: string

      The flag key.

    Returns void

  • Experimental

    Set an override value for a flag that takes precedence over the real flag value.

    Parameters

    • flagKey: string

      The flag key.

    • value: any

      The override value.

    Returns void