function FeatureFlagsPlugin
Since 0.1.0
FeatureFlagsPlugin(options: FeatureFlagsPluginOptions): IPlugin

FeatureFlagsPlugin factory.

Registers a FeatureFlagService implementing IFeatureFlags under CAPABILITIES.FEATURE_FLAGS, a feature-flags health indicator, and an onClose hook that stops the provider.

Examples

Example 1

import { FeatureFlagsPlugin } from '@setu-ts/feature-flags-plugin';

app.register(FeatureFlagsPlugin({
  provider: 'config',
  options: {
    flags: {
      'beta': { enabled: true },
    },
  },
}));

Parameters

Plugin configuration (discriminated union).

Return Type

IPlugin

The plugin instance.

Usage

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