Skip to main content

LazySchema <T>

Type parameters

  • T = boolean

Hierarchy

Index

Methods

never

  • Mark that this field should never be used.

notNullable

  • Disallow null values.

notUndefinable

  • Disallow undefined values. Will fallback to the default value.

nullable

  • Allow and return null values.

schema

  • schema(): string
  • The type of schema.

state

  • The internal state object. Contains useful metadata.

type

  • type(): string
  • The type of schema and it’s children (when applicable).

undefinable

  • Allow and return undefined values. Will NOT fallback to the default value.

validate

  • Run all validation checks that have been enqueued and return a type casted value. If a value is undefined, inherit the default value, otherwise throw if required. If nullable and the value is null, return early.