Hyperlinkv0.8.0-beta.28

ConfigProvider

ConfigProvider.makeArrayfunctioneffect/ConfigProvider.ts:164
(length: number, value?: string): Node

Creates an Array node representing an indexed container with a known length.

When to use

Use when you need to describe a JSON array or numerically indexed env vars inside a custom provider.

Details

The optional value allows a node to be both a container and a leaf at the same time.

Example (Creating an array node)

import { ConfigProvider } from "effect"

const node = ConfigProvider.makeArray(3)
// { _tag: "Array", length: 3, value: undefined }
export function makeArray(length: number, value?: string): Node {
  return { _tag: "Array", length, value }
}