-
It means, should I write Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Good question! Short answer: you don't have to define any of those types. Those types are automatically defined by Prisma. Long answer: The contents of import {PrismaClient} from '@prisma/client'
export * from '@prisma/client'
const prisma = new PrismaClient()
export default prisma Notice the You can see all the Prisma type definitions by opening |
Beta Was this translation helpful? Give feedback.
Good question!
Short answer: you don't have to define any of those types. Those types are automatically defined by Prisma.
Long answer: The contents of
db.ts
is:Notice the
export * from '@prisma/client'
line. That line exports all of types defined by Prisma, including the *{Create,Delete,Update}Args types.You can see all the Prisma type definitions by opening
node_modules/.prisma/client/index.d.ts