Hyperlinkv0.8.0-beta.28

DynamicConfig

DynamicConfig.freezeconstsrc/DynamicConfig.ts:582
<Bag extends Record<string, ConfigField<unknown>>>(
  bag: Bag
): FrozenBag<Bag>

Read-only view of a config: every field becomes a FixedField, so .set won't compile against it. Touches no store state — the underlying keys stay swappable for any handle that still holds the original. Hand a frozen config to code that should only read.

export const freeze = <
  Bag extends Record<string, ConfigField<unknown>>,
>(
  bag: Bag,
): FrozenBag<Bag> => rebuildBag<FrozenBag<Bag>>(bag, () => true);