You kinda can share function signatures with TypeScript's import type.
And that's what tRPC does but adds some generics in the middle to make things seamless.
Explanation here: https://colinhacks.com/essays/painless-typesafety
And that's what tRPC does but adds some generics in the middle to make things seamless.
Explanation here: https://colinhacks.com/essays/painless-typesafety