Hello, i am just starting to use Prisma and i'm co...
# orm-help
k
Hello, i am just starting to use Prisma and i'm confused about type inference, could not find any mentions about this in the docs so i don't know if i have something wrong? The thing is, if i use ``
Copy code
const test = await prisma.user.findMany();
i don't have any type inference, and i can just type 'test' as anything i want. Is there something i can do so functions like this do type inference out of the box? I just have the "getting started" project, although it's in an express project and inside a mono-repository, so it might be an issue with our setup, or if i can't find the good page of the documentation. Thanks for any help!
a
Yeah, I think this may have something to do with your environment specifics. I'd expect test to be an array of typed users, which an IDE like VSCode will pick up.
👍 1
k
Hmm ok, i'm using Webstorm, and even in the debugger it does not show the type, while it usually does.. Afraid it's the typescript configuration / monorepo interaction.. Thanks for help!
Welp RTFM i guess, the typescript configuration was not ISO to the one of the documentation, now it works :x.
a
🙌
n
Hey Kenny 👋 Sometimes users face issues when the IDE typescript server could not detect types from node_modules, so restarting the typescript server often solves these kinds of issues.