Skip to content

@vttforge/core / TypedSchemaFieldInstance

Interface: TypedSchemaFieldInstance<T, O>

One of several shapes, told apart by a type property.

Each entry becomes its own SchemaField. When an entry does not declare a type field, the field adds one (a required string whose value must equal that entry's key), which is what makes the result a discriminated union you can narrow on.

Extends

Type Parameters

T

T extends Record<string, Record<string, FieldInstance>> = Record<string, Record<string, FieldInstance>>

O

O extends TypedSchemaFieldOptions = TypedSchemaFieldOptions

Properties

[BRAND]

readonly [BRAND]: "typedSchema"

Overrides

FieldInstance.[BRAND]


options

readonly options: O

Overrides

FieldInstance.options


types

readonly types: T

MIT licensed.