UNPKG

@trpc/client

Version:

The tRPC client library

27 lines • 1.15 kB
import { n as Operation, t as HTTPHeaders, u as TRPCLink } from "./types-DO-GCB2q.mjs"; import { t as HTTPLinkBaseOptions } from "./httpUtils-v7O5xeam.mjs"; import { AnyClientTypes, AnyRouter } from "@trpc/server/unstable-core-do-not-import"; //#region src/links/httpLink.d.ts /** * The options of `httpLink`. * @see https://trpc.io/docs/client/links/httpLink#httplink-options */ type HTTPLinkOptions<TRoot extends AnyClientTypes> = HTTPLinkBaseOptions<TRoot> & { /** * Headers for each request: an object, or a function of the operation * that returns them. * @see https://trpc.io/docs/client/headers */ headers?: HTTPHeaders | ((opts: { op: Operation; }) => HTTPHeaders | Promise<HTTPHeaders>); }; /** * A terminating link that sends each call in its own HTTP request. It can * send `FormData` and binary inputs. * @see https://trpc.io/docs/client/links/httpLink */ declare function httpLink<TRouter extends AnyRouter = AnyRouter>(opts: HTTPLinkOptions<TRouter['_def']['_config']['$types']>): TRPCLink<TRouter>; //#endregion export { httpLink as n, HTTPLinkOptions as t }; //# sourceMappingURL=httpLink-yX9QPwni.d.mts.map