Example
when generating a zod schema
import { convexToZod } from "convex-helpers/server/zod4";
export const PersonSchema = convexToZod(Person.table.validator);
We get a proper ZodValidator when we define the table as followed
export const Person= Table("persons", {
firstName: v.string(),
lastName: v.string(),
gender: v.union(v.literal("male"), v.literal("female"), v.literal("other")),
});
But when we define it as
export const Person= Table("persons", {
firstName: v.string(),
lastName: v.string(),
gender: literals("male", "female", "other"),
});
The zod PersonSchema gives a never type to the gender field