Extracting literal values from Drizzle enums
I'm trying to make a zod enum schema from the values of a Drizzle enum I've created. I've looked through several other posts trying to do the same thing and it's unclear to me how to do this, particularly for
mysqlEnum. The most promising way came from inspecting the enums at runtime. I found that I could access the values, just as I wanted, at myEnum.config.enumValues. The only problem is that Typescript declares config protected and I get type errors.