arrays
Handles arrays
@zod
model User {
id: string;
items?: string[];
}
zod.ts
import * as z from "zod";
export const User = z.shape({
id: z.string(),
items: z.string().array().optional(),
});
export type User = z.infer<typeof User>;
Handles arrays
@zod
model User {
id: string;
items?: string[];
}
import * as z from "zod";
export const User = z.shape({
id: z.string(),
items: z.string().array().optional(),
});
export type User = z.infer<typeof User>;