You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.
Hi there,
Have been using this package for a while now and it has saved me a lot of time! Thank you.
One issue that I have been regularly facing is that enums from Prisma's generated client are of the form:
I prefer that actual enums are exported, but often find that I have issues when I use the types/schemas generated by Prisma client and nestjs-zod-prisma interchangeably:
Type 'import("/Users/oldo/node_modules/.prisma/client/index").Role' is not assignable to type 'import("/Users/oldo/packages/zod/src/enums").Role'.
Type '"admin"' is not assignable to type 'Role'.
Would it be possible to generate enums in the same way as Prisma client does? As far as I can tell, there is no way to modify the way Prisma client generates enums...
The text was updated successfully, but these errors were encountered:
Hi there,
Have been using this package for a while now and it has saved me a lot of time! Thank you.
One issue that I have been regularly facing is that enums from Prisma's generated client are of the form:
However
nestjs-zod-prisma
exports actual TS enums:I prefer that actual enums are exported, but often find that I have issues when I use the types/schemas generated by Prisma client and
nestjs-zod-prisma
interchangeably:Would it be possible to generate enums in the same way as Prisma client does? As far as I can tell, there is no way to modify the way Prisma client generates enums...
The text was updated successfully, but these errors were encountered: