Sharing the tRPC client across a monorepo
Okay so bare with me because I'm really new to monorepos, and I haven't ever messed with the typescript config so this is all new to me.
So I have my router defined in my apps/server, and I'm exporting the routers in my package.json:
But when I import the type in my code.. for some reason it comes out as
any
.
The main question is how do I fix it, but I'm also curious if there's a more correct way to do this..
I saw for example on cal.com
's repo that they have a whole separate package dedicated only to tRPC.
But doing that would also mean I have to move my drizzle schemas their own package. And at that point, I'll barely have any code left in the actual server app, which feels wrong. Is it bad practice to export stuff from my server app?
2 Replies