XenoWaiT
XenoWaiT
Explore posts from servers
DTDrizzle Team
Created by XenoWaiT on 4/29/2024 in #help
Drizzle Studio: Cannot read properties of undefined (reading 'name')
@Ze'ev sure its imported from a file enums.ts
export enum Gender {
MALE = "MALE",
FEMALE = "FEMALE",
}


export function enumToPgEnum(myEnum: any): [string, ...string[]] {
return Object.values(myEnum).map((value: any) => `${value}`) as [
string,
...string[],
];
}
const genderEnumList = enumToPgEnum(Gender);
export const genderEnum = pgEnum('gender', genderEnumList);
export enum Gender {
MALE = "MALE",
FEMALE = "FEMALE",
}


export function enumToPgEnum(myEnum: any): [string, ...string[]] {
return Object.values(myEnum).map((value: any) => `${value}`) as [
string,
...string[],
];
}
const genderEnumList = enumToPgEnum(Gender);
export const genderEnum = pgEnum('gender', genderEnumList);
4 replies