Skip to content

Glossary: TypeScript Beyond the Basics

z.infer

Also written: z.infer<typeof S>

Works out the TypeScript type that a Zod schema accepts, so you don't write the type twice. A value and a type may share a name, such as `Product`.

Where the book teaches it

Related terms

SchemaSingle source of truth