Infer Type from PgEnum
Hey, I'd like to infer a PgEnum to a TypeScript Type.
So something like this:
How could I achieve this?
So something like this:
How could I achieve this?
const eventTypeEnum = pgEnum('event_type', [
'training',
'matchday',
'tournament',
'event',
'labour'
]);
// get the following as a result
type EventType = 'training' | 'matchday' | 'tournament' | 'event' | 'labour'