import { CreateTRPCReactQueryClientConfig, DecorateQueryProcedure } from "../getQueryKey.d-C_PnqPni.cjs"; import { TRPCClient, TRPCUntypedClient } from "@trpc/client"; import { AnyQueryProcedure, AnyRootTypes, AnyRouter, ProtectedIntersection, RouterRecord, inferClientTypes, inferRouterContext } from "@trpc/server/unstable-core-do-not-import"; import { DehydrateOptions, DehydratedState, QueryClient } from "@tanstack/react-query"; import { TransformerOptions } from "@trpc/client/unstable-internals"; //#region src/server/ssgProxy.d.ts type CreateSSGHelpersInternal = { router: TRouter; ctx: inferRouterContext; } & TransformerOptions>; interface CreateSSGHelpersExternal { client: TRPCClient | TRPCUntypedClient; } type CreateServerSideHelpersOptions = CreateTRPCReactQueryClientConfig & (CreateSSGHelpersExternal | CreateSSGHelpersInternal); type SSGFns = 'queryOptions' | 'infiniteQueryOptions' | 'fetch' | 'fetchInfinite' | 'prefetch' | 'prefetchInfinite'; /** * @internal */ type DecoratedProcedureSSGRecord = { [TKey in keyof TRecord]: TRecord[TKey] extends infer $Value ? $Value extends AnyQueryProcedure ? Pick, SSGFns> : $Value extends RouterRecord ? DecoratedProcedureSSGRecord : never : never }; /** * Create functions you can use for server-side rendering / static generation * @see https://trpc.io/docs/v11/client/nextjs/server-side-helpers */ declare function createServerSideHelpers(opts: CreateServerSideHelpersOptions): ProtectedIntersection<{ queryClient: QueryClient; dehydrate: (opts?: DehydrateOptions) => DehydratedState; }, DecoratedProcedureSSGRecord>; //#endregion export { createServerSideHelpers }; //# sourceMappingURL=index.d.cts.map