Is there more elegant way to infer enums?

This works:
type TransactionReason = (typeof transactionReasonEnum)['enumValues'][number]


But I wonder if Drizzle happen to have built-in way to infer TypeScript union from PostgreSQL enum.
Was this page helpful?