zod
Version:
Typescript-first schema declaration and validation library with static type inference
13 lines (12 loc) • 418 B
TypeScript
import * as z from './base';
import { ZodUndefined } from './undefined';
import { ZodUnion } from './union';
export interface ZodNullDef extends z.ZodTypeDef {
t: z.ZodTypes.null;
}
export declare class ZodNull extends z.ZodType<null, ZodNullDef> {
optional: () => ZodUnion<[this, ZodUndefined]>;
nullable: () => ZodUnion<[this, ZodNull]>;
toJSON: () => ZodNullDef;
static create: () => ZodNull;
}