tRPCttRPC
Powered by
typedefT
tRPC•3y ago•
2 replies
typedef

[Help] Turbo shared types

I have a turborepo with two apps (web and embed). web is a t3 stack and embed is a create-react-app. I am trying to use the trpc endpoint from web to embed. I managed to make it work by configuring web's cors. However, I am getting type issues when importing AppRouter in the embed app. I don't think you can just import AppRouter from web like
import type { AppRouter } from "../../../web/src/server/routers/_app";
import type { AppRouter } from "../../../web/src/server/routers/_app";
which is currently what I am doing.

So my question is how would I go about this? do I need to somehow share the types between the two? if so how would I do it?.

Should I just seperate trpc as an internal package?
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

Types not being shared with the frontend
scrubbuddySscrubbuddy / ❓-help
2y ago
t3-turbo
Surya AshishSSurya Ashish / ❓-help
3y ago
T3 turbo refactoring question
JWWJJWW / ❓-help
2mo ago
Mismatched types
squishycantaloupeSsquishycantaloupe / ❓-help
8mo ago