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

Evaluates a flag, awaiting the provider when it can answer asynchronously.

Both entry points funnel through the SAME provider instance, so a configured option — fallbackValue above all — governs identically whether a caller reaches for the synchronous or the asynchronous method. A provider with no async path resolves its synchronous evaluation, 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>

true when the flag is on; unknown flags → false.

Usage

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