Consumer tRPC client package from private API type?
I have a monrepo (template from t3-turbo), with a tRPC API package. I'd like to expose a router for a public SDK by simply exposing the type of that router such that a tRPC client can be created, like
The issue is that I cannot get Typescript to incorporate type dependencies i.e. from prisma into this package. I'd like to just compile each required type into index.d.ts, but this doesn't seem to be something typescript supports.
Has anyone else encountered this issue? Thinking about just using something like Zodios but it seems redundant to write these types knowing they exist already.
2 Replies