From 9dd869b32117311d7ae6732a40840d87198e708b Mon Sep 17 00:00:00 2001 From: m-shaka Date: Mon, 16 Sep 2024 16:02:23 +0900 Subject: [PATCH] docs(rpc): add descriptions about compilation process --- docs/guides/rpc.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/guides/rpc.md b/docs/guides/rpc.md index 49a7f734..efba9014 100644 --- a/docs/guides/rpc.md +++ b/docs/guides/rpc.md @@ -454,6 +454,12 @@ export default app; Now `tsserver` doesn't instantiate type arguments of `app` every time you use it because it's already done. It will make your IDE a lot faster! +If your project is a monorepo, this solution does fit well. Using a tool like [`turborepo`](https://turbo.build/repo/docs), you can easily separate the server project and the client project and get better integration managing dependencies between them. + +If your client and server are in the same project, [project references](https://www.typescriptlang.org/docs/handbook/project-references.html) of `tsc` is a good option. + +You can also coordinate your build process manually with tools like `concurrently` or `npm-run-all`. Here is [an example repository](https://github.com/yusukebe/hono-rpc-with-d-ts). + #### specify type arguments manually This is a bit cumbersome, but you can specify type arguments manually to avoid type instantiation.