vite-plugin-ts-to-zod
v0.1.4
Published
Vite plugin to transform typescript types to zod schemas
Downloads
1
Readme
vite-plugin-ts-to-zod
Vite plugin to transform typescript types to zod schemas.
Usage
pnpm i -D vite-plugin-ts-to-zod// vite.config.ts
import { viteZod } from 'vite-plugin-ts-to-zod';
export default defineConfig({
plugins: [
viteZod()
]
});// src/hero.ts
export interface Hero {
name: string;
}// src/index.ts
import { heroSchema } from './hero?zod';
import { type Hero } from './hero';