Function: splitLink()
splitLink<
TRouter>(opts):TRPCLink<TRouter>
Defined in: packages/client/dist/splitLink.d-Df2gT0RV.d.mts:5
Type Parameters
| Type Parameter | Default type |
|---|---|
TRouter extends AnyRouter | AnyRouter |
Parameters
| Parameter | Type | Description |
|---|---|---|
opts | { condition: (op) => boolean; false: TRPCLink<TRouter> | TRPCLink<TRouter>[]; true: TRPCLink<TRouter> | TRPCLink<TRouter>[]; } | - |
opts.condition | (op) => boolean | - |
opts.false | TRPCLink<TRouter> | TRPCLink<TRouter>[] | The link to execute next if the test function returns false. |
opts.true | TRPCLink<TRouter> | TRPCLink<TRouter>[] | The link to execute next if the test function returns true. |
Returns
TRPCLink<TRouter>