effect-io-ai

Package: effect
Module: Config

Config.Config.Wrap

Wraps a nested structure, converting all primitives to a Config.

Config.Wrap<{ key: string }> becomes { key: Config<string> }

To create the resulting config, use the unwrap constructor.

Signature

type Wrap<A> = [NonNullable<A>] extends [infer T] ? [IsPlainObject<T>] extends [true] ?
        | { readonly [K in keyof A]: Wrap<A[K]> }
        | Config<A>
    : Config<A>
    : Config<A>

Source

Since v2.0.0