tRPCttRPC
Powered by
sugar_waterS
tRPC•3y ago•
14 replies
sugar_water

Separating routers into their own modules and merging them causes "any" type in client

Hi all,

I've separated my router into multiple files, but when merging them I get
any
any
types for all procedures in the client. This happens with both
mergeRouters
mergeRouters
and composing a parent
router
router
with multiple child
router
router
s.

It seems like trpc is loosing type information... I've verified that both my client and server trpc have the same version,
10.23.0
10.23.0
, and that my typescript configuration is correct according to the docs.

My environment is:

node:
v19.2.0
v19.2.0

npm
8.19.3
8.19.3


Anyone know what's up with this? Thanks!
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

merging other routers to appRouter
NazCodelandNNazCodeland / ❓-help
3y ago
Merging two clients into one
LukaLLuka / ❓-help
3y ago
Struggling to refactor into sub-routers
sebastienbarreSsebastienbarre / ❓-help
5mo ago