valibot
valibot copied to clipboard
Schemas generation from Typescript Type aliases
Hey! What about automatically generating schemas from typescript? I think it would be very handy for big projects to generate initial schemas at the beginning of the valibot journey 😄
Example
// exists type
type SomeFormsValues = {
name: string;
lastName: string;
age: number;
}
// generated type
const SomeFormsValuesSchema = object( {
name: string();
lastName: string();
age: number();
});
my idea demo: https://github.com/stovv/valibot-ts-codegen
Hi, I think thats similar to TypeBox-Workbench. I am interested in such a solution and it would be cool to add it as a tool to our website. Let's talk about it. If you are interested you can find me via fabianhiller
on Discord.
I'm still interested, but I don't think I'll be able to work on it in the next 6 months, so I'm closing this issue for now.