@trpc/react-query
Version:
23 lines • 987 B
TypeScript
import { type QueryClient } from '@tanstack/react-query';
import type { TRPCClient } from '@trpc/client';
import { TRPCUntypedClient } from '@trpc/client';
import type { AnyRouter } from '@trpc/server/unstable-core-do-not-import';
import { type TRPCQueryUtils } from '../shared';
export interface CreateQueryUtilsOptions<TRouter extends AnyRouter> {
/**
* The `TRPCClient`
*/
client: TRPCClient<TRouter> | TRPCUntypedClient<TRouter>;
/**
* The `QueryClient` from `react-query`
*/
queryClient: QueryClient;
}
/**
* Creates a set of utility functions that can be used to interact with `react-query`
* @param opts the `TRPCClient` and `QueryClient` to use
* @returns a set of utility functions that can be used to interact with `react-query`
* @internal
*/
export declare function createUtilityFunctions<TRouter extends AnyRouter>(opts: CreateQueryUtilsOptions<TRouter>): TRPCQueryUtils<TRouter>;
//# sourceMappingURL=createUtilityFunctions.d.ts.map