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

Did you find this page helpful?