Skip to content

Function: defineGroup() ​

ts
function defineGroup<Schema, Children, ActiveKeys>(options): GroupDefinitionOf<Schema, NoInfer<Children>, NoInfer<ActiveKeys>, undefined>;

Defined in: core/src/definitions/define-group.ts:168

Defines a group: its own keys in schema, nested definitions in children, and the rules that relate them. A declared group always exists in the draft as an object.

Type Parameters ​

Type ParameterDefault type
Schema extends | StandardSchemaV1<unknown, unknown> | undefinedundefined
Children extends Readonly<Record<string, Definition>>EmptyObject
ActiveKeys extends string | number | symbolnever

Parameters ​

ParameterType
optionsDefineGroupOptions<Schema, Children, ActiveKeys, undefined>

Returns ​

GroupDefinitionOf<Schema, NoInfer<Children>, NoInfer<ActiveKeys>, undefined>

Released under the MIT License.