FlagsCoreOptions
Defined in: core.ts:86
Options for createFlagsCore.
Properties
Section titled “Properties”| Property | Type | Description | Defined in |
|---|---|---|---|
comparators? |
ComparatorRegistry |
Custom comparators for value-object types in evaluation contexts (e.g. Dinero, Decimal), layered over the process-wide registry from ./comparators.registerComparator for FlagsCore.evaluate (test targeting). See ./comparators.ComparatorRegistry. | core.ts:103 |
defaultEnvironmentKey? |
string |
Default environment key when callers omit one. Default "production". |
core.ts:94 |
defaultProjectKey? |
string |
Default project key when callers omit one. Default "default". |
core.ts:92 |
hooks? |
FlagsHooksInput |
Control-plane hooks fired around admin mutations. Pass one hook or an array. before hooks run sequentially and may throw to deny; after hooks run post-commit for side effects and never fail the operation. See ./hooks/contract.FlagsHooks. |
core.ts:116 |
matchers? |
MatcherRegistry |
Named query matchers backing the matches/notMatches operators, layered over the process-wide registry from ./matchers.registerMatcher for FlagsCore.evaluate. See ./matchers.MatcherRegistry. |
core.ts:109 |
onHookError? |
HookErrorReporter |
Reporter invoked when an after hook throws. Defaults to a console.warn. The error is always swallowed — a failing side effect never rolls back an already-committed mutation. |
core.ts:122 |
readonly? |
boolean |
When true, all mutating operations throw ReadonlyError. | core.ts:96 |
retention? |
RetentionOptions |
Retention policy, applied after each successful publish. Snapshot pruning never removes the active or latest version; audit pruning trims the per-environment audit log. Removed payloads are surfaced to after hooks (snapshot.deleted with pruned: true, audit.pruned) so they can be offloaded before they’re gone. See RetentionOptions. |
core.ts:130 |
runtimeStorage? |
KvStorage |
Published-snapshot store read by runtimes. Defaults to sourceStorage. |
core.ts:90 |
sourceStorage |
KvStorage |
Canonical store: drafts, snapshot history, audit. | core.ts:88 |