(length: number, value?: string): NodeCreates 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 function makeArray(
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 }
makeArray(length: numberlength: number, value: string | undefinedvalue?: string): type Node =
| {
readonly _tag: "Value"
readonly value: string
}
| {
readonly _tag: "Record"
readonly keys: ReadonlySet<string>
readonly value: string | undefined
}
| {
readonly _tag: "Array"
readonly length: number
readonly value: string | undefined
}
A discriminated union describing the shape of a configuration value at a
given path.
When to use
Use when implementing a custom ConfigProvider by returning raw
nodes from the get callback passed to
make
, or when inspecting raw
provider output before schema parsing.
Details
Value is a terminal string leaf. Record is an object-like container
whose immediate child keys are known and may carry an optional co-located
value. Array is an indexed container with a known length and may also
carry an optional co-located value.
Node {
return { _tag: "Array"_tag: "Array", length: numberlength, value: string | undefinedvalue }
}