Type Alias: LocalLinkOptions<TRouter>
On this page
LocalLinkOptions<
TRouter>:object&TransformerOptions<inferClientTypes<TRouter>>
Defined in: packages/client/src/links/localLink.ts:34
Options for localLink.
Type declaration
createContext()
createContext: () =>
Promise<inferRouterContext<TRouter>>
Creates the context for each call.
Returns
Promise<inferRouterContext<TRouter>>
See
https://trpc.io/docs/client/links/localLink#createcontext
onError()?
optionalonError: (opts) =>void
Called when a procedure throws.
Parameters
| Parameter | Type |
|---|---|
opts | ErrorHandlerOptions<inferRouterContext<TRouter>> |
Returns
void
See
https://trpc.io/docs/client/links/localLink#onerror
router
router:
TRouter
The router to call.
See
https://trpc.io/docs/client/links/localLink#router
Type Parameters
| Type Parameter |
|---|
TRouter extends AnyRouter |