Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/valibot/src/schemas/nullable/index.ts>NullableSchema

The modular and type safe schema library for validating structural data 🤖
Extremely Popular
Go to Latest
interface NullableSchema
implements BaseSchema<Input<TWrapped> | null, TOutput>
import { type NullableSchema } from "https://deno.land/x/valibot@v0.30.0/src/schemas/nullable/index.ts";

Nullable schema type.

Type Parameters

TWrapped extends BaseSchema
optional
TDefault extends Default<TWrapped> = undefined
optional
TOutput = TDefault extends Input<TWrapped> | (() => Input<TWrapped>) ? Output<TWrapped> : Output<TWrapped> | null

Properties

type: "nullable"

The schema type.

wrapped: TWrapped

The wrapped schema.

default: TDefault

The default value.