sugar_waterS
tRPC3y 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
types for all procedures in the client. This happens with both mergeRouters and composing a parent router with multiple child routers.

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, and that my typescript configuration is correct according to the docs.

My environment is:

node: v19.2.0
npm 8.19.3

Anyone know what's up with this? Thanks!
Was this page helpful?