Skip to main content

Type Alias: ConfigField<V, M>

type ConfigField<V, M> = z.ZodType<V | undefined, unknown> & object;

Defined in: packages/overcast-core/src/config-schema.ts:114

One string-configurable field of a layer config, as configField returns it: a parser producing V, and ConfigMeta registered alongside.

V | undefined because every config field is optional — see ConfigShape. Zod's input type is left as unknown rather than pinned to string, because the two things a field most often needs disagree about it: z.coerce.number() reports its input as unknown, and a .transform() reports the type before the transform. Neither matters — the output is what has to line up with the config field, and that is what V fixes.

Type Declaration​

[CONFIG_FIELD]?​

readonly optional [CONFIG_FIELD]?: M;

The field's ConfigMeta, at its literal type — never present at runtime. It is what lets omitSecrets and pickScope say which keys they removed in the type they return, not only in the object.

Type Parameters​

Type ParameterDefault type
V-
M extends ConfigMetaConfigMeta