@trpc/client
Version:
25 lines • 849 B
text/typescript
import { n as Operation, u as TRPCLink } from "./types-BrCJd1zp.cjs";
import { AnyRouter } from "@trpc/server/unstable-core-do-not-import";
//#region src/links/splitLink.d.ts
/**
* Sends each operation down one of two link chains, based on `condition`.
*
* @see https://trpc.io/docs/client/links/splitLink
*/
declare function splitLink<TRouter extends AnyRouter = AnyRouter>(opts: {
/**
* Picks the chain for an operation.
*/
condition: (op: Operation) => boolean;
/**
* The link to execute next if the test function returns `true`.
*/
true: TRPCLink<TRouter> | TRPCLink<TRouter>[];
/**
* The link to execute next if the test function returns `false`.
*/
false: TRPCLink<TRouter> | TRPCLink<TRouter>[];
}): TRPCLink<TRouter>;
//#endregion
export { splitLink as t };
//# sourceMappingURL=splitLink-i7EskO_m.d.cts.map