Jorge
Jorge2w ago

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
BeBoRE
BeBoRE2w ago
Have you read the FAQ? Looks like you don't have strict enabled in your TypeScript config
Jorge
Jorge2w ago
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.
More Posts
Where put transformer on custom link? (upgrading to V11 with T3-Setup)In the Screenshot are the changes I made to the TRPC-Server client. Question: **Where do i put theclient server counication with webSocketsHi, I would like to be able to send data via ws api from my frontend. Still, I don't seem to be ableHow do you call a router procedure from another router procedure?```javascript .query(async ({ ctx, input }) => { const wikiQuery = await routerFromAnotherFileCannot figure out the correct typeI am trying to use tRPC outside of React. I use it in React, but I need a separate way to use it. I Trying to get the return type of a procedure.Using TRPC v11. I am failing to return the type. I get the error Type alias 'ProtectedProcedureType'Having great difficulty using StreamingI wanted to use the stream api with tRPC to handle a response with alot of return values and I lookeUnable to abort Suspense queriesI am using trpc@11 with react-query@5. I was under the impression that as long as abortOnUnmount is Authorization and Authentication while using unstable_httpSubscriptionLinkI'm wondering what best practices are for specifying headers like bearer tokens when using httpSubscCustom data transformer and input/output schemaHello 👋 I would like to code a data transformer, but I would this data transformer to be aware ofProperty 'error' does not exist on type 'MiddlewareOKResult<any>'.Hello, I am building an trpc adapter for nestjs, and I am trying to extend some of trpc's functional