Skip to main content

$nullable

Callable

  • $nullable<T>(literal: ConstExpr<T>): NullableType<T>

  • Create a new ThereforeNode instance with the given options.

    Example

    $object({
    foo: $nullable($string)
    })

    Type parameters

    Parameters

    • literal: ConstExpr<T>

      The schema to make a nullable property.

    Returns NullableType<T>