You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hey! i was wondering why this wonderful library doesn't have support for classes, the same way that it does for types and interfaces. i felt like this'd be the most interesting use case for ts-to-zod, where you have an existing class that you are using at runtime and simply want to generate a validator for its schema... so i was pretty surprised to not even see a mention of classes anywhere. maybe i'm missing something?
Input
classDog{barks: boolean}
Output
constdogSchema=z.object({barks: z.boolean()})
The text was updated successfully, but these errors were encountered:
Indeed, class are not supported as I guess nobody (maintainer, contributors or else) have asked for it 😉
This is mostly a community-driven lib, so if you want to take some time to propose a PR, I'll be glad to review it!
Feature description
hey! i was wondering why this wonderful library doesn't have support for classes, the same way that it does for types and interfaces. i felt like this'd be the most interesting use case for ts-to-zod, where you have an existing class that you are using at runtime and simply want to generate a validator for its schema... so i was pretty surprised to not even see a mention of classes anywhere. maybe i'm missing something?
Input
Output
The text was updated successfully, but these errors were encountered: