Endpoints lose Input and Output Types on tRPC Client
Environment: Node with Bun package manager
What's wrong: The problem I am facing is that on the trpc client I am able to type safely access the routes, however the type annotation of the output and input gets lost.
What I have: https://github.com/trpc/trpc/discussions/5881 left here all the relevant information on my pov
GitHub
Endpoints lose Input and Output Types on tRPC Client · trpc trpc · ...
I am using a turborepo monorepo where I have the trpc client on packages/shared (repo) and trpc definitions/config/routers on packages/server (@repo/server). The problem I am facing is that on the ...
2 Replies
Have you read the FAQ?
Looks like you don't have strict enabled in your TypeScript config
Yes I had it enabled on
"extends": "@repo/tsconfig/base.json"
.
✅ Just found the solution:
Since I was having typescript loose references (on tsconfig's) and overall build process getting errors outside of the tRPC package, it seems like this was affecting the Type annotation of the Input and Output Types of tRPC.