Setu-TS
    Preparing search index...

    Feature flag service that delegates to a single FlagProvider.

    Implements the synchronous IFeatureFlags contract; the provider owns a cached snapshot and refreshes it out of band via its own async lifecycle.

    const service = new FeatureFlagService(provider);
    await service.start();
    const on = service.isEnabled('new-dashboard', { userId: 'u1' });
    await service.stop();

    0.1.0

    Implements

    Index
    • 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.

      • Optionalcontext: FlagContext

        Targeting context.

      Returns Promise<boolean>

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

      0.2.0