P
Prisma2mo 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
David2mo ago
Can you show how you are defining the Issue type?
TANK
TANK2mo ago
import { Issue, Prisma } from "@prisma/client";
import { Issue, Prisma } from "@prisma/client";
simply imported from generated prisma types
David
David2mo 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.