Is it possible to prefix/suffix the types generate...
# orm-help
k
Is it possible to prefix/suffix the types generated in prisma client? Like
model User
is mapped to
PrismaUser
rather than User. It clashes with my typings and i want an easier DX of importing types
t
Automatically or manually? Manually you can use @map-attribute https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#map-1
n
Hey 👋 You can alias the type when importing
Copy code
import { User as PrismaUser } from '@prisma/client'
We also have a Feature Request which discusses about specifying prefix/postfix to generated prisma types, could you please leave a 👍 to the request? It would help our team in prioritising it.
k
I was thinking about automatically!
Yes this is how im currently doing the imports!
But it sometimes clashes with my auto import when importing the user type hehe
😃 1
Yes thank you! I will try to use map attribute or import it like that for a while. Hopefully the feature will get implement once in the future!
👍 1