TargetingRule

db · /index·interface

One rule in a feature flag's targeting configuration. rule names the evaluator registered in the platform, params supplies its inputs, and value is the override returned when the rule matches the requesting context.

Properties

params
Record<string, JsonValue>
rule
string
description?
string

Example

import type { TargetingRule } from '@nordcom/commerce-db';
const rule: TargetingRule = { rule: 'shopDomain', params: { domain: 'acme.com' }, value: true };

FeatureFlagService ReviewService ShopService FeatureFlagOption FeatureFlagRef ResolvedCartLineTokens ResolvedProductCardTokens ResolvedShopTheme

Metadata@nordcom/commerce-db@0.1.0Open in GitHub ↗

On this page