P
Prisma6mo ago
TANK

Typescript error

Hi, i am new to Prisma and have a typescript error in VS Code when trying to access a property from relation. Actually UI shows info correctly, but how to fix the problem in code ?
No description
No description
No description
3 Replies
David
David6mo ago
Can you show how you are defining the Issue type?
TANK
TANK6mo ago
import { Issue, Prisma } from "@prisma/client";
import { Issue, Prisma } from "@prisma/client";
simply imported from generated prisma types
David
David6mo ago
That is only the type for the basic entity. Better to do type Issue = typeof issue in the place where you run the query.
Want results from more Discord servers?
Add your server