1 | import type { QueryKey, QueryObserverOptions } from 'react-query';
|
2 | import type { WritableAtom } from 'jotai';
|
3 | import type { CreateQueryOptions, GetQueryClient } from './types';
|
4 | export declare type AtomWithQueryAction = {
|
5 | type: 'refetch';
|
6 | };
|
7 | export declare type AtomWithQueryOptions<TQueryFnData, TError, TData, TQueryData> = QueryObserverOptions<TQueryFnData, TError, TData, TQueryData> & {
|
8 | queryKey: QueryKey;
|
9 | };
|
10 | export declare type AtomWithQueryOptionsWithEnabled<TQueryFnData, TError, TData, TQueryData> = Omit<AtomWithQueryOptions<TQueryFnData, TError, TData, TQueryData>, 'enabled'> & {
|
11 | enabled: boolean;
|
12 | };
|
13 | export declare function atomWithQuery<TQueryFnData, TError, TData = TQueryFnData, TQueryData = TQueryFnData>(createQuery: CreateQueryOptions<AtomWithQueryOptionsWithEnabled<TQueryFnData, TError, TData, TQueryData>>, getQueryClient?: GetQueryClient): WritableAtom<TData | TQueryData | undefined, AtomWithQueryAction, Promise<void>>;
|
14 | export declare function atomWithQuery<TQueryFnData, TError, TData = TQueryFnData, TQueryData = TQueryFnData>(createQuery: CreateQueryOptions<AtomWithQueryOptions<TQueryFnData, TError, TData, TQueryData>>, getQueryClient?: GetQueryClient): WritableAtom<TData | TQueryData, AtomWithQueryAction, Promise<void>>;
|