Skip to content

featureFlag

featureFlag(options): PipelineBehaviorTuple<FeatureFlagBehavior, FeatureFlagBehaviorOptions>

Defined in: packages/pipeline-feature-flags/src/helpers/feature-flag.intent.ts:25

Returns a feature-flag behavior entry for pipeline.wrap() or createPipeline({ globalBehaviors }).

FeatureFlagIntentOptions

Required flag key plus evaluation and fallback options.

PipelineBehaviorTuple<FeatureFlagBehavior, FeatureFlagBehaviorOptions>

The behavior class and options tuple. A disabled flag prevents handler execution; the behavior returns the configured fallback or throws FeatureDisabledError.

@pipeline.wrap({ kind: 'command' }, featureFlag({
flag: 'user-registration',
defaultValue: false,
fallback: () => ({ disabled: true }),
}))