dryvPacks

@dryv/zodv0.1.0

zod schemas with field limits, formats and invariants.

Zod schemasValidationInjectPublished 7 days ago2 downloads

dryv pack add @dryv/zod
331 BRaw ↗
jinja
import { z } from "zod";

/** {{ property.enum.description or property.enum.name.title }} */
export const {{ file.symbol }} = z.enum([{% for item in property.enum.values %}{{ item.value | tojson }}{% if not loop.last %}, {% endif %}{% endfor %}]);

export type {{ property.enum.name.pascal }} = z.infer<typeof {{ file.symbol }}>;