ThreeCrown
ThreeCrown2mo ago

AppRouter Type Declaration Method

Is there a method where I can manually define the AppRouter Type outside of importing the AppRouter from the Server as a type? I'm running a more complex monorepo structure and am trying to create a shared type package/module but, if I import the AppRouter as a Type it will create a circular dependency. Ideally, I basically just created a bunch of procedure objects and then stacked them together and was trying to create a base level understanding of the AppRouter as a Type to pass to TRPC Clients that I make. If I am unable to do it this way, I suppose I could just create a seperate shared module for the trpcClient then import it from the server in that seperate module and utilize that module to create Clients per service... But I would prefer to just define my trpcClient within the services as the type of client varies by the service.
No description
No description
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?