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 Parameter | Default type |
|---|---|
Schema extends | StandardSchemaV1<unknown, unknown> | undefined | undefined |
Children extends Readonly<Record<string, Definition>> | EmptyObject |
ActiveKeys extends string | number | symbol | never |
Parameters
| Parameter | Type |
|---|---|
options | DefineGroupOptions<Schema, Children, ActiveKeys, undefined> |
Returns
GroupDefinitionOf<Schema, NoInfer<Children>, NoInfer<ActiveKeys>, undefined>