Created
January 17, 2022 14:32
-
-
Save iskenxan/0f3997d8b5f3d635c025ca24e377b22e to your computer and use it in GitHub Desktop.
Typescript schema validation with zod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { z } from "zod"; | |
const User = z.object({ | |
email: z.string().email(), | |
name: z.string(), | |
phoneNumber: z.number() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment