method LaunchDarklyProvider.prototype.isEnabledAsync
LaunchDarklyProvider.prototype.isEnabledAsync(
flag: string,
context?: FlagContext
): Promise<boolean>

Evaluates a flag by awaiting LaunchDarkly directly.

Unlike LaunchDarklyProvider.isEnabled this has no cold-context caveat. It also refreshes the snapshot cache, so a later synchronous read for the same context is answered from real state.

Parameters

flag: string

Flag name

optional
context: FlagContext

Targeting context

Return Type

Promise<boolean>

The evaluated value, or the configured fallbackValue when the client is unavailable

Usage

import { LaunchDarklyProvider } from "feature-flags-plugin/src/index.ts";