NULLABLE_DATA()function

NULLABLE_DATA(props: Schemas<T>): NullableSchema<T>
ParamType
propsSchemas<T>
A named schema for each property of the data object. required
Return
NullableSchema<T>
Schema that wraps a source schema and additionally allows null.

Create a schema for a valid data object with specified properties, or null.

Sugar factory for NullableSchema.

Examples

NULLABLE_DATA({ name: STRING }) // NullableSchema<{ name: string }>