Skip to content

Function: defineField() ​

ts
function defineField<Schema>(options): FieldDefinitionOf<Schema, undefined>;

Defined in: core/src/definitions/define-field.ts:60

Defines a field: one value with its own schema. It holds undefined while empty, and the schema decides whether empty is an error.

Type Parameters ​

Type Parameter
Schema extends StandardSchemaV1<unknown, unknown>

Parameters ​

ParameterType
optionsDefineFieldOptions<Schema, undefined>

Returns ​

FieldDefinitionOf<Schema, undefined>

Released under the MIT License.