FeatureFuel
2

Native TypeScript Enums

Source: supabase/supabase#28179 · opened by @axelrindle
While TypeScript codegen is working fine, I'd like to suggest the usage of [Native TypeScript Enums]( This would allow users to use the Enum for validation purposes, e.g. using zod.

An example:



Then I could do the following with zod:

`ts
import { Meal } from '@/db'

const formSchema = z.object({
meal: z.nativeEnum(Meal)
})

No pledges yet. Be the first to back this.

Make a pledge

Pledge your monetary support if this feature is added.

$

Comments

No comments yet.

Replying to

Add a comment

What do you think about this feature request?


Similar requests