Skip to content

Type Inference (v1)

This documents the old v1 API. See Types for the current version.

Always export your router type from the server and import it (as a type) in the client:

server.ts
export type AppRouter = typeof appRouter;
// client.ts
import type { AppRouter } from "./server";
const client = createZocketClient<AppRouter>(...);

This keeps your bundle size small — the runtime router code is not imported.