Kent C. Dodds
12/06/2021, 4:51 PM.prisma/client
in my node_modules
. Should I be importing types from that instead of @prisma/client
now?
It appears that the correct thing to do is import generated types from .prisma/client
and import everything else I need (like PrismaClient
) from @prisma/client
. Is this correct?Noel Martin Llevares
12/06/2021, 5:13 PM@prisma/client/index.d.ts
exports `.prisma/client`:
export * from '.prisma/client'
This means that you still import @prisma/client
in your own .ts
files:
import { PrismaClient } from '@prisma/client'
nikolasburk
.prisma/client
folder has been introduced quite a long time ago and iirc it’s only there to get around some quirks with package managers that would otherwise prune the @prisma/client
dependency, but I can validate this with our Engineering team and get back to you.
It appears that the correct thing to do is import generated types fromYou should be able to entirely ignore the presence of theand import everything else I need (like.prisma/client
) fromPrismaClient
. Is this correct?@prisma/client
.prisma/client
folder and just import everything from @prisma/client
.Kent C. Dodds
12/06/2021, 5:15 PM