Hyperlinkv0.8.0-beta.28

ConfigProvider

ConfigProvider.makeRecordfunctioneffect/ConfigProvider.ts:131
(keys: ReadonlySet<string>, value?: string): Node

Creates a Record node representing an object-like container with known child keys.

When to use

Use when you need to describe a directory or JSON object inside a custom provider.

Details

The optional value allows a node to be both a container and a leaf at the same time (for example, an env var A=x that also has children A_FOO and A_BAR).

Example (Creating a record node)

import { ConfigProvider } from "effect"

const node = ConfigProvider.makeRecord(new Set(["host", "port"]))
// { _tag: "Record", keys: Set(["host", "port"]), value: undefined }
constructorsmakeValuemakeArray
export function makeRecord(keys: ReadonlySet<string>, value?: string): Node {
  return { _tag: "Record", keys, value }
}
Referenced by 1 symbols