UNPKG

react-query-kit

Version:

🕊️ A toolkit for ReactQuery that make ReactQuery hooks more reusable and typesafe

17 lines (16 loc) • 755 B
import * as TanstackReactQuery from '@tanstack/react-query'; import type { Query, QueryClient } from '@tanstack/react-query'; import type { Middleware } from './types'; export declare const ReactQuery: typeof TanstackReactQuery; export declare const isV5 = true; export declare const suspenseOptions: { enabled: boolean; suspense: boolean; keepPreviousData: undefined; useErrorBoundary: (_error: unknown, query: Query) => boolean; }; export declare const withMiddleware: (hook: any, defaultOptions: any, type: 'queries' | 'mutations') => (options?: { client?: QueryClient; use?: Middleware[]; }, queryClient?: QueryClient) => any; export declare const getKey: (queryKey: readonly unknown[], variables?: any) => readonly unknown[];