4 ms·
YES! I've introduced ts-to-zod into my codebase only yesterday, and it's served my needs exactly. It doesn't handle generics or mapped types, but that's a fair
by xmonkee 4y ago
YES! I've introduced ts-to-zod into my codebase only yesterday, and it's served my needs exactly. It doesn't handle generics or mapped types, but that's a fair price to pay.
It also works the other way, you can define a zod schema and you can infer types for your data from it.
https://github.com/fabien0102/ts-to-zod https://github.com/fabien0102/ts-to-zod