import { AutoRefreshOptions } from './useSimpleAutoRefreshQuery'; import { UseSimpleQueryProps, UseSimpleQueryReturn } from './useSimpleQuery'; export type UseSimpleParameterlessAutoRefreshQueryProps = Pick, 'query' | 'onResultReceived' | 'onLoadingChange'> & AutoRefreshOptions; /** * @deprecated * * Performs a query on mount and repeats the query according to `refreshInterval`. * Use this when `query` doesn't depend on any outside variables, e.g. props. * * Example: * ``` * const { doQuery, doQueryAsync } = useParameterlessAutoRefreshQuery({ * query: api.workDoc.getcount, * onResultReceived: (count) => { * setCount(count) * dispatch(setShowBackendUnreachableAlert(false)) * }, * refreshInterval: moment.duration(1, 'minute'), * onConnectionError: () => dispatch(setShowBackendUnreachableAlert(true)) * }) * ``` * * @typeParam TResult the type returned by the query */ export declare function useSimpleParameterlessAutoRefreshQuery(props: UseSimpleParameterlessAutoRefreshQueryProps): UseSimpleQueryReturn;