effect-io-ai

Package: effect
Module: ConfigProvider

ConfigProvider.makeRecord

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 }

See

Signature

declare const makeRecord: (keys: ReadonlySet<string>, value?: string) => Node

Source

Since v4.0.0