tRPC router

The object that groups a server’s tRPC procedures by name; its type, usually exported as AppRouter, is all the client needs.

In more detail

Routers can be nested to organise procedures by feature. The exported type is erased at compile time, so no server code reaches the browser bundle.

Example

export type AppRouter = typeof appRouter

Related terms

Taught in

References