union of strings & Record as Generic argument
I'm using prisma and it generates Object for runtime and union of that object keys as type. Due to that I'm unable to use it in my type schemas:
I've tried to manage it using scopes but looks like it is due to conflict of types.
My current hack is:
Maybe there's more clear way?
2 Replies
I think you just want
type.enumerated(...Object.keys(GameTransactionType))