hypps
hypps•2w ago

Type sharing between Deno server and Expo app not working

Hi all! 👋 I'm trying to share tRPC types between a Deno server and an Expo React Native app in a monorepo. My Deno server exports a fully-typed AppRouter for its tRPC routes, and I want the Expo client to import that type directly so that any changes in the backend are immediately reflected in the client's type checking. However, while everything works at runtime, TypeScript in the Expo client resolves the imported AppRouter as any, which means I'm not catching type errors as expected. I really wanted to give Deno a try, but if I can't resolve this issue, I might have to consider migrating to Node. Has anyone encountered this problem or found a workaround? Thanks in advance! https://github.com/emilkallioniemi/FamILY/tree/wip
2 Replies
marvinh.
marvinh.•2w ago
That sounds like an unexpected behaviour. Can you file an issue for that here https://github.com/denoland/deno/issues ?
hypps
hyppsOP•2w ago
I've just created an issue—it's my first one, and there wasn’t a template, just the title and description. I hope it covers everything, but let me know if you need any additional information from me @marvinh.. Here's a link to the issue: https://github.com/denoland/deno/issues/28613

Did you find this page helpful?