method FlagProvider.isEnabledAsync
Since 0.2.0
FlagProvider.isEnabledAsync(
flag: string,
context?: FlagContext
): Promise<boolean>

Optionally evaluate a flag asynchronously, when the backing source can produce a more accurate answer than the cached snapshot.

Implemented only by providers whose SDK evaluates asynchronously (the LaunchDarkly provider). A provider that omits it is not deficient: the service resolves FlagProvider.isEnabled instead, which for a purely local snapshot is already the correct answer.

Parameters

flag: string

Flag name

optional
context: FlagContext

Targeting context

Return Type

Promise<boolean>

The evaluated value

Usage

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