Class BooleanType<TRequired>

Boolean type definition.

Type Parameters

  • TRequired extends boolean = false

Hierarchy (View Summary)

Constructors

Properties

_required: boolean
defaultValue?:
    | TypeOutput<boolean, TRequired>
    | () => TypeOutput<boolean, TRequired>
hasDefault: boolean
isSensitive: boolean
isVirtual: boolean
options: Record<string, unknown>
validators: ValidatorFunction<boolean>[]

Methods

  • Configure a default value (or factory) for the field.

    Parameters

    Returns this

  • Flag the field as sensitive so joins/exposures can omit it by default.

    Parameters

    • isSensitive: boolean = true

    Returns this

  • Validate the supplied value and return the normalized result.

    Parameters

    • value: unknown
    • fieldName: string = 'field'

    Returns TypeOutput<boolean, TRequired>