Evaluation and privacy
Define a typed config
defineConfig validates at runtime while preserving literal TypeScript types.
Use validateConfig for a list of issues and parseConfig when invalid input
should throw.
Evaluate with an explicit fallback
Deterministic rollouts
Weights use integer units out of 100,000. Assignment is stable for a flag, variation allocation, and targeting key. Allocations may total less than 100,000; unallocated buckets continue to fallthrough. Progressive rollouts interpolate between two explicit allocations at an explicit instant.Inspect before you change
explainEvaluation returns ordered eligibility, assignment, evaluation, and
exposure-candidate stages at a caller-supplied time. dependencyPaths,
impactPaths, testSegmentMembership, and simulateProposedConfig reuse the
same evaluator so previews do not drift from runtime behavior.
The exposure-candidate stage is advisory. Inspection does not emit telemetry or
prove that the user encountered a feature.
Project configuration to clients
sanitizeContext always keeps targetingKey and copies only approved
attributes.
Client-side evaluation reveals delivered rules and comparison values. Keep
sensitive rules on the server, use remote evaluation, or produce an evaluated
client snapshot instead.