Type Alias: CreateTRPCClientWithRouterOptions<TRouter, TLinks>
On this page
CreateTRPCClientWithRouterOptions<
TRouter,TLinks>:Omit<CreateTRPCClientOptions<TRouter>,"links"> &object
Defined in: packages/client/src/createTRPCClient.ts:213
The options of createTRPCClient with the router's type passed as
router: routerType<AppRouter>().
Type declaration
links
links:
TLinks
The links each call goes through, in order. The last one must send
the call, such as httpBatchLink. What they declare types each call's
context, and which methods the client has. Pass them inline or
as const: in an array declared without it, TypeScript can merge the
links' types and drop what one declares.
See
https://trpc.io/docs/client/links
router
router:
RouterType<TRouter>
The router's type, from routerType<AppRouter>(). It's a type only:
nothing about the router is sent or bundled.
Type Parameters
| Type Parameter | Default type |
|---|---|
TRouter extends AnyRouter | - |
TLinks extends readonly TRPCLink<TRouter, any>[] | TRPCLink<TRouter>[] |