Primitive Types
Zod validates each field against its declared type. Try changing age to a string or removing active to see the errors.
import { z } from 'zod';
const schema = z.object({
name: z.string(),
age: z.number(),
active: z.boolean(),
});type Schema = {
name: string;
age: number;
active: boolean;
}{
"name": "Alice",
"age": 30,
"active": true
}