Easy way to validate enums
Brand new to Arktype(migrating over from Zod for perf reasons), and have a question about about handling enums. We have a fair number of enums that we use in our validation, example with Zod might be something like:
Seems like a way to do this in ArkType might be something like:
I tried to create a helper function so I don't have to do Object.values thing everywhere:
But Arktype doesn't seem to like the return type on this. Any ideas as to how to easily handle this use case?
Seems like a way to do this in ArkType might be something like:
I tried to create a helper function so I don't have to do Object.values thing everywhere:
But Arktype doesn't seem to like the return type on this. Any ideas as to how to easily handle this use case?