Expand description
Code generation for #[derive(ZodTs)].
Generates a fn zod_ts() -> String method that returns a complete
TypeScript block with a Zod schema and a z.infer type alias,
plus an inventory::submit! for SchemaRegistration.
Functions§
- base_
type_ name - Extract the base type name, stripping all wrappers.
- derive_
zod_ ts - Generate the
#[derive(ZodTs)]expansion. - rust_
type_ to_ ts_ schema - Convert a Rust type name string to a TypeScript Zod schema reference.
- rust_
type_ to_ zod - Map a
syn::Typeto a Zod schema expression string. - to_
schema_ name - Convert type name to schema constant name:
"Planet"→"PlanetSchema"