© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•3y ago•
6 replies
tmcw

Is there a simpler way to get an enum type than (typeof enumType)["enumValues"][number]?

Pretty quick question (and maybe quick answer) - we have this pattern in a few places and it looks a bit verbose.
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Is there a better way to access enum types?
Drizzle TeamDTDrizzle Team / help
3y ago
Way to get relations via typeof someSchema.$inferSelect?
Drizzle TeamDTDrizzle Team / help
2y ago
Is there a way to properly type a "generic query"
Drizzle TeamDTDrizzle Team / help
8mo ago
Get plain typescript type from enum
Drizzle TeamDTDrizzle Team / help
3y ago