Interface Schema<TEntriesModel, TExtraModel>

Data schema definition for JavaScript object serialized as map.

Such schema can be built with ucMap function.

Type Parameters

  • in out TEntriesModel extends EntriesModel = EntriesModel

    Per-entry model type.

  • out TExtraModel extends UcModel | false = false

    Extra entries model type, or false to prohibit extra entries.

Hierarchy

Properties

entries: Entries<TEntriesModel>
extra: TExtraModel extends UcModel
    ? Of<TExtraModel>
    : false
nullable?: boolean

Whether the data is nullable.

When true the data value may be null.

Default Value

false, which means null data value prohibited.

optional?: boolean

Whether the data is optional.

When true the data value may be undefined.

Default Value

false, which means undefined data value prohibited.

type: "map"

Either unique type name, or type class.

Code generation is based on this name.

where?: UcConstraints<Infer<TEntriesModel, TExtraModel>, UcSchema<Infer<TEntriesModel, TExtraModel>>>

Schema constraints.

within?: UcPresentations<Infer<TEntriesModel, TExtraModel>>

Schema instance presentation constraints.

Methods

Generated using TypeDoc