Hello everyone. Is it possible to instruct the pri...
# orm-help
s
Hello everyone. Is it possible to instruct the prisma CLI to generate TS string enums instead of string unions types for enums?
I know that unions are lighter thanks to type erasure, but enums make some scenarios easier. For instance, I wanted to randomly pick enum values for my seed data (user role in this case), and with a string enum if would be simple, I could use Object.values(UserRole) to get all the possible values, then pick a random one using faker.random.arrayElement(Object.values(UserRole))
r
@Sébastien Dubois 👋 This is currently not supported, but I would suggest creating a feature request here for the same so that we can look into this 🙂
👍 1
s