Plain object
- Input
- {"id":1,"name":"Ana","active":true}
- Expected output
- import { z } from "zod"; export const RootSchema = z.object({ id: z.int(), name: z.string(), active: z.boolean(), }); export type Root = z.infer<typeof RootSchema>;
The type comes from z.infer.