Skip to content

Function: arrayOf() ​

Call Signature ​

ts
function arrayOf<Schema>(item, options?): ArrayDefinition<FieldDefinitionOf<Schema, undefined>>;

Defined in: core/src/definitions/array-of.ts:26

Defines an array whose items are fields of the given Standard Schema.

Type Parameters ​

Type Parameter
Schema extends StandardSchemaV1<unknown, unknown>

Parameters ​

ParameterType
itemSchema
options?ArrayOfOptions<FieldDefinitionOf<Schema, undefined>>

Returns ​

ArrayDefinition<FieldDefinitionOf<Schema, undefined>>

Call Signature ​

ts
function arrayOf<Item>(item, options?): ArrayDefinition<Item>;

Defined in: core/src/definitions/array-of.ts:34

Defines an array of a definition, or of () => definition for a definition that refers to itself. Items are identified by key, so their errors and touched state move with them.

Type Parameters ​

Type Parameter
Item extends ItemSource

Parameters ​

ParameterType
itemItem
options?ArrayOfOptions<Item>

Returns ​

ArrayDefinition<Item>

Released under the MIT License.