-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
In this page at "Handling Errors" section where safeParse is being explained there is an example explaining safeParse but there is a little mistake there.
const result = Player.parse({ username: 42, xp: "100" });
if (!result.success) {
result.error; // ZodError instance
} else {
result.data; // { username: string; xp: number }
}
The code is like this and it should be Player.safeParse right?
jaller94
Metadata
Metadata
Assignees
Labels
No labels