UNPKG

@trpc/client

Version:

The tRPC client library

24 lines • 1.06 kB
import { t as HTTPLinkBaseOptions } from "../httpUtils-CxgZ3W-1.cjs"; import { n as Operation, t as HTTPHeaders, u as TRPCLink } from "../types-BhHxuBsu.cjs"; import { AnyClientTypes, AnyRouter } from "@trpc/server/unstable-core-do-not-import"; /** * The options of `httpLink`. * @see https://trpc.io/docs/client/links/httpLink#httplink-options */ export 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 */ export declare function httpLink<TRouter extends AnyRouter = AnyRouter>(opts: HTTPLinkOptions<TRouter['_def']['_config']['$types']>): TRPCLink<TRouter>; //# sourceMappingURL=httpLink.d.cts.map