UNPKG

@trpc/client

Version:

The tRPC client library

25 lines • 1.1 kB
import { t as HTTPLinkBaseOptions } from "./httpUtils-gZ7bAQ6T.mjs"; import { n as Operation, t as HTTPHeaders, u as TRPCLink } from "./types-BG-3kpeg.mjs"; 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 */ 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>; export { httpLink as n, HTTPLinkOptions as t }; //# sourceMappingURL=httpLink-BjZdBzr6.d.mts.map