Skip to main content

Type Alias: ConfigField<V>

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

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

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]?: never;

Type Parameters

Type Parameter
V