Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to represent the a schema Field.

Hierarchy

  • Field

Index

Constructors

constructor

  • new Field(name: string, label: string | null, description: string | null, type: string, required: boolean, defaultValue: unknown, flags: Set<string>): Field
  • Constructor for the Field class.

    Parameters

    • name: string

      Field name.

    • label: string | null

      Field label (human format).

    • description: string | null

      Field description.

    • type: string

      Datatype of the field.

    • required: boolean

      true if the field is required.

    • defaultValue: unknown

      Default value of the field.

    • flags: Set<string>

      Field flags.

    Returns Field

Properties

defaultValue

defaultValue: unknown

Default value of the field.

description

description: string | null

Field description.

flags

flags: Set<string>

Field flags.

label

label: string | null

Field label (human format).

name

name: string

Field name.

required

required: boolean

true if the field is required.

type

type: string

Datatype of the field.

Methods

serialize

Static deserialize

  • Deserialize an object into an Field instance.

    function

    deserialize

    static
    memberof

    Field

    Parameters

    • name: string

      Name of the field.

    • data: FieldType

      Javascript object of the Field.

    Returns Field

    Field instance.

Generated using TypeDoc