VladV
tRPC10mo ago
3 replies
Vlad

`useTRPC` has the any type meanwhile `AppRouter` doesn't

I'm using monorepo (turborepo) and importing
AppRouter
from the backend for types.
AppRouter
appears to have types, but
useTRPC
doesn't. How can I fix it?
image.png
image.png
image.png
Solution
Figured it out. Just add these lines to the tsconfig.json file:
  "references": [{
    "path": "../server"
  }]
Was this page helpful?