Skip to main content

Schema

Callable

  • Schema<T>(defaultValue?: T): T

  • The Schema function is used to set type and value for a property in a schema class or on a class property. It also accepts a default value.

    @group

    Functions/Schema

    @see

    Techniques for Schema.


    Type parameters

    • T

    Parameters

    • optionaldefaultValue: T

      The default value for the property. The default value is automatically assigned when the original value is undefined.

    Returns T