Getting Started
Introduction
Zod v4 introduction reference generated from source at d40c3299.
Zod is a TypeScript-first schema validation library. A schema describes the shape of data; parse checks an unknown input and returns a typed value, or throws a ZodError with structured issues.
import * as z from "zod";
const User = z.object({ name: z.string(), age: z.number().int().min(0) });
const user = User.parse({ name: "Ada", age: 36 }); // typed
type User = z.infer<typeof User>;This documentation set was generated with Sourcey from the public source at pinned commit d40c329910436e528d3c26cb1b9179e05abebf05. It covers the primitives, combinators, refinements, transforms, parsing, inference, error formatting, and JSON Schema surfaces.
- Repository: https://github.com/colinhacks/zod
- License: MIT
- Sourcey pages: one page per concept, navigable and searchable.