Search
Get Started
DT
Drizzle Team
•
3y ago
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 Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,794
Members
View on Discord
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Is there a better way to access enum types?
DT
Drizzle Team / help
2y ago
Way to get relations via typeof someSchema.$inferSelect?
DT
Drizzle Team / help
2y ago
Is there a way to properly type a "generic query"
DT
Drizzle Team / help
6mo ago
Get plain typescript type from enum
DT
Drizzle Team / help
3y ago