Skip to content
A

object

function object<F, P>(opts): ObjectProducer<{ [K in string | number | symbol]: ({ [K in string | number | symbol]: FieldValue<F[K]> } & { [K in string | number | symbol]?: FieldValue<F[K]> })[K] }, P> & object;

Defined in: src/core/producer.ts:310

A fixed set of named fields. Output type is inferred from fields.

The concrete fields map type is also carried in the phantom _fields, so the project selector can mirror the producer’s structure at the type level (an atomic custom field stays a leaf even when its value type looks structural).

Type ParameterDefault type
F extends Record<string, Producer<unknown, Presence>>-
P extends Presence"optional"
ParameterType
optsobject & BaseMeta

ObjectProducer<{ [K in string | number | symbol]: ({ [K in string | number | symbol]: FieldValue<F[K]> } & { [K in string | number | symbol]?: FieldValue<F[K]> })[K] }, P> & object