Vanerac
Vanerac
DTDrizzle Team
Created by rykuno on 7/2/2023 in #help
PGEnum -> Typescript Enum
const valueMap = [
'short_text',
'long_text',
'single_choice',
'multiple_choice',
] as const

const typeEnum = pgEnum('type', valueMap);

export type SurveyQuestionType = typeof typeEnum[number]
const valueMap = [
'short_text',
'long_text',
'single_choice',
'multiple_choice',
] as const

const typeEnum = pgEnum('type', valueMap);

export type SurveyQuestionType = typeof typeEnum[number]
I'd try something like this
5 replies