Hyperlinkv0.8.0-beta.28

DynamicConfig

DynamicConfig.globalSwappableconstsrc/DynamicConfig.ts:285
<A>(config: Config.Config<A>): SwappableField<A>

A hot-swappable field whose key joins the process-wide allowlist — declare it anywhere (even at module scope), no wiring, and setByKey can swap it by string on any runtime. Reach for this when a remote/RPC handler swaps the value. For a field with no global footprint, scoped to one provision, use swappable.

constructorssetByKeyswappable
export const globalSwappable = <A>(
  config: Config.Config<A>,
): SwappableField<A> => {
  const envKeys = recordKeys(config);
  // joins the process-wide allowlist registry
  for (const key of envKeys) {
    registerSwappable(key, config);
  }
  return makeSwappableField(config, envKeys);
};