/// import { TRPCClient, TRPCClientError, TRPCRequestOptions } from '@trpc/client'; import type { AnyRouter, inferHandlerInput, inferProcedureInput, inferProcedureOutput } from '@trpc/server'; import { CancelOptions, FetchInfiniteQueryOptions, FetchQueryOptions, InfiniteData, InvalidateOptions, InvalidateQueryFilters, QueryClient, RefetchOptions, RefetchQueryFilters, SetDataOptions } from 'react-query'; import { Updater } from 'react-query/types/core/utils'; interface TRPCFetchQueryOptions extends FetchQueryOptions, TRPCRequestOptions { } interface TRPCFetchInfiniteQueryOptions extends FetchInfiniteQueryOptions, TRPCRequestOptions { } export declare type SSRState = false | 'prepass' | 'mounting' | 'mounted'; export interface TRPCContextState { queryClient: QueryClient; client: TRPCClient; /** * @deprecated use `ssrState === 'prepass'` */ isPrepass: boolean; ssrContext: TSSRContext | null; /** * State of SSR hydration. * - `false` if not using SSR. * - `prepass` when doing a prepass to fetch queries' data * - `mounting` before TRPCProvider has been rendered on the client * - `mounted` when the TRPCProvider has been rendered on the client */ ssrState: SSRState; /** * @link https://react-query.tanstack.com/guides/prefetching */ fetchQuery, TInput extends inferProcedureInput>(pathAndInput: [path: TPath, ...args: inferHandlerInput], opts?: TRPCFetchQueryOptions, TOutput>): Promise; /** * @link https://react-query.tanstack.com/guides/prefetching */ fetchInfiniteQuery, TInput extends inferProcedureInput>(pathAndInput: [path: TPath, ...args: inferHandlerInput], opts?: TRPCFetchInfiniteQueryOptions, TOutput>): Promise>; /** * @link https://react-query.tanstack.com/guides/prefetching */ prefetchQuery, TInput extends inferProcedureInput>(pathAndInput: [path: TPath, ...args: inferHandlerInput], opts?: TRPCFetchQueryOptions, TOutput>): Promise; /** * @link https://react-query.tanstack.com/guides/prefetching */ prefetchInfiniteQuery, TInput extends inferProcedureInput>(pathAndInput: [path: TPath, ...args: inferHandlerInput], opts?: TRPCFetchInfiniteQueryOptions, TOutput>): Promise; /** * @deprecated use `invalidateQueries` */ invalidateQuery>(pathAndInput: [TPath, TInput?], options?: InvalidateOptions): Promise; /** * @link https://react-query.tanstack.com/guides/query-invalidation */ invalidateQueries>(pathAndInput?: [TPath, TInput?] | TPath, filters?: InvalidateQueryFilters, options?: InvalidateOptions): Promise; /** * @link https://react-query.tanstack.com/guides/query-invalidation */ invalidateQueries(filters?: InvalidateQueryFilters, options?: InvalidateOptions): Promise; /** * @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries */ refetchQueries>(pathAndInput: [TPath, TInput?], filters?: RefetchQueryFilters, options?: RefetchOptions): Promise; /** * @link https://react-query.tanstack.com/reference/QueryClient#queryclientrefetchqueries */ refetchQueries(filters?: RefetchQueryFilters, options?: RefetchOptions): Promise; /** * @link https://react-query.tanstack.com/guides/query-cancellation */ cancelQuery>(pathAndInput: [TPath, TInput?], options?: CancelOptions): Promise; /** * @link https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydata */ setQueryData, TOutput extends inferProcedureOutput>(pathAndInput: [TPath, TInput?], updater: Updater, options?: SetDataOptions): void; /** * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata */ getQueryData, TOutput extends inferProcedureOutput>(pathAndInput: [TPath, TInput?]): TOutput | undefined; /** * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata */ setInfiniteQueryData, TOutput extends inferProcedureOutput>(pathAndInput: [TPath, TInput?], updater: Updater | undefined, InfiniteData>, options?: SetDataOptions): void; /** * @link https://react-query.tanstack.com/reference/QueryClient#queryclientgetquerydata */ getInfiniteQueryData, TOutput extends inferProcedureOutput>(pathAndInput: [TPath, TInput?]): InfiniteData | undefined; } export declare const TRPCContext: import("react").Context; export {}; //# sourceMappingURL=context.d.ts.map