Skip to main content
Version: 10.x

Function: splitLink()

splitLink<TRouter>(opts): TRPCLink< TRouter >

Type parameters

ParameterDefault
TRouter extends Router< AnyRouterDef< AnyRootConfig, any >, TRouter >AnyRouter

Parameters

ParameterTypeDescription
optsobject-
opts.condition(op) => boolean-
opts.falseTRPCLink< TRouter > | TRPCLink< TRouter >[]The link to execute next if the test function returns false.
opts.trueTRPCLink< TRouter > | TRPCLink< TRouter >[]The link to execute next if the test function returns true.

Returns

TRPCLink< TRouter >

Source

packages/client/dist/links/splitLink.d.ts:3


Generated using TypeDoc and typedoc-plugin-markdown