How do I infer type of pgEnum

How can I infer the type of a pgEnum?

export const roleEnum = pgEnum('role', ['A', 'B', 'C', 'D', 'E'])

// Expected to somehow have type Role = 'A' | 'B' | 'C' | 'D' | 'E'
type Role = typeof roleEnum.$inferMagic
Was this page helpful?