Skip to main content

Schema

Callable

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

  • Declares a property of a schema class, with its type and, optionally, its default: subnetName = Schema<string>(), or logRetentionInDays? = Schema<number>(30) for an optional one.

    @group

    Functions/Schema

    @see

    Techniques for Schema.


    Type parameters

    • T

    Parameters

    • optionaldefaultValue: T

      The value the property takes when it is given as undefined or left out.

    Returns T