1 | import type { InfiniteData, InfiniteQueryObserverOptions, QueryKey, RefetchOptions, RefetchQueryFilters } from 'react-query';
|
2 | import type { WritableAtom } from 'jotai';
|
3 | import { CreateQueryOptions, GetQueryClient } from './types';
|
4 | export declare type AtomWithInfiniteQueryAction<TQueryFnData> = ({
|
5 | type: 'refetch';
|
6 | } & Partial<RefetchOptions & RefetchQueryFilters<TQueryFnData>>) | {
|
7 | type: 'fetchNextPage';
|
8 | } | {
|
9 | type: 'fetchPreviousPage';
|
10 | };
|
11 | export declare type AtomWithInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryData> = InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryData> & {
|
12 | queryKey: QueryKey;
|
13 | };
|
14 | export declare type AtomWithInfiniteQueryOptionsWithEnabled<TQueryFnData, TError, TData, TQueryData> = Omit<AtomWithInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryData>, 'enabled'> & {
|
15 | enabled: boolean;
|
16 | };
|
17 | export declare function atomWithInfiniteQuery<TQueryFnData, TError, TData = TQueryFnData, TQueryData = TQueryFnData>(createQuery: CreateQueryOptions<AtomWithInfiniteQueryOptionsWithEnabled<TQueryFnData, TError, TData, TQueryData>>, getQueryClient?: GetQueryClient): WritableAtom<InfiniteData<TData | TQueryData> | undefined, AtomWithInfiniteQueryAction<TQueryFnData>>;
|
18 | export declare function atomWithInfiniteQuery<TQueryFnData, TError, TData = TQueryFnData, TQueryData = TQueryFnData>(createQuery: CreateQueryOptions<AtomWithInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryData>>, getQueryClient?: GetQueryClient): WritableAtom<InfiniteData<TData | TQueryData>, AtomWithInfiniteQueryAction<TQueryFnData>>;
|