The combined, yieldable form — yield* DynamicConfig.all({...}) reads every
field into one object, like Config.all. Accepts a field map or a bag from
make; pass one into the other to convert.
Reads all fields at once, so it's all-or-nothing (it fails if any field fails); per-field reads via make are independent.
export const const all: <F extends FieldsInput>(
input: F
) => AllConfig<ConfigBag<F>>
The combined, yieldable form — yield* DynamicConfig.all({...}) reads every
field into one object, like Config.all. Accepts a field map or a bag from
make
; pass one into the other to convert.
Reads all fields at once, so it's all-or-nothing (it fails if any field fails);
per-field reads via
make
are independent.
all = <const function (type parameter) F in <const F extends FieldsInput>(input: F): AllConfig<ConfigBag<F>>F extends type FieldsInput = {
readonly [key: string]:
| Config.Config<unknown>
| ConfigField<unknown>
}
FieldsInput>(
input: const F extends FieldsInputinput: function (type parameter) F in <const F extends FieldsInput>(input: F): AllConfig<ConfigBag<F>>F,
): interface AllConfig<Bag extends FieldRecord>The combined, yieldable-as-a-whole form of a config (like Config.all):
yield* allCfg resolves every field into one object. No per-field accessors —
make
has those; pass either into the other to convert.
AllConfig<type ConfigBag<F extends FieldsInput> = {
readonly [K in keyof F]: FieldOf<F[K]>
}
A bag of
ConfigField
s produced by
make
/
extend
.
ConfigBag<function (type parameter) F in <const F extends FieldsInput>(input: F): AllConfig<ConfigBag<F>>F>> => {
const const result: Mutable<
AllConfig<ConfigBag<F>>
>
const result: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
result = const makeEffectable: <AllConfig<ConfigBag<F>>>(proto: object) => Mutable<AllConfig<ConfigBag<F>>>makeEffectable<interface AllConfig<Bag extends FieldRecord>The combined, yieldable-as-a-whole form of a config (like Config.all):
yield* allCfg resolves every field into one object. No per-field accessors —
make
has those; pass either into the other to convert.
AllConfig<type ConfigBag<F extends FieldsInput> = {
readonly [K in keyof F]: FieldOf<F[K]>
}
A bag of
ConfigField
s produced by
make
/
extend
.
ConfigBag<function (type parameter) F in <const F extends FieldsInput>(input: F): AllConfig<ConfigBag<F>>F>>>(const AllProto: Effect.Effect<
BagShape<FieldRecord>,
Config.ConfigError,
never
>
const AllProto: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
AllProto);
// `make(input)` is typed `ConfigBag<F>` — exactly the `[AllTypeId]` slot.
const result: Mutable<
AllConfig<ConfigBag<F>>
>
const result: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
result[const AllTypeId: typeof AllTypeIdAllTypeId] = function make<F>(fields: F): ConfigBag<F> (+1 overload)Group fields into a bag with per-field accessors (cfg.apiKey.set(...)). Each
value is a plain Config (→ read-only field) or an already-built field from
swappable
/ another bag. Pass an
AllConfig
to convert it back.
make(input: const F extends FieldsInputinput);
return const result: Mutable<
AllConfig<ConfigBag<F>>
>
const result: {
pipe: { <A>(this: A): A; <A, B = never>(this: A, ab: (_: A) => B): B; <A, B = never, C = never>(this: A, ab: (_: A) => B, bc: (_: B) => C): C; <A, B = never, C = never, D = never>(this: A, ab: (_: A) => B, bc: (_: B) => C, cd: (_: C) => D): D; <…;
toString: () => string;
toJSON: () => unknown;
}
result;
};