UNPKG

@trpc/next

Version:

The tRPC Next.js library

15 lines 824 B
import type { HTTPBatchLinkOptions, HTTPLinkOptions, TRPCLink } from '@trpc/client'; import type { AnyRootTypes, AnyRouter } from '@trpc/server/unstable-core-do-not-import'; interface NextLinkBaseOptions { revalidate?: number | false; batch?: boolean; } type NextLinkSingleOptions<TRoot extends AnyRootTypes> = NextLinkBaseOptions & Omit<HTTPLinkOptions<TRoot>, 'fetch'> & { batch?: false; }; type NextLinkBatchOptions<TRoot extends AnyRootTypes> = NextLinkBaseOptions & Omit<HTTPBatchLinkOptions<TRoot>, 'fetch'> & { batch: true; }; export declare function experimental_nextHttpLink<TRouter extends AnyRouter>(opts: NextLinkSingleOptions<TRouter['_def']['_config']['$types']> | NextLinkBatchOptions<TRouter['_def']['_config']['$types']>): TRPCLink<TRouter>; export {}; //# sourceMappingURL=nextHttp.d.ts.map