import { UseResourceResponse, Resource, Options, UseCreateResourceResponse } from "../types"; export declare type UseResourceOptions = { /** * Adds a delay to loading so that loading is not shown if the api is fetched sooner * * If you set it 1000 ms, loading not showing until 1000 ms */ loadingStartDelay?: number; }; /** * This function allow to use resource without React.Suspense. * * @example * const { data = [], isLoading, error } = useResource(resource); */ declare function useResource>(resource: T, { loadingStartDelay }?: UseResourceOptions): UseResourceResponse; /** * A hook for creating resource without preloading * * @example * const { resource, refetch } = useCreateResource(fetchApi, accountID, amount); * resource.preload(); // if you need to preload data call this * * @param fetchFunc Promise returned function * @param arg This is fetchFunc arguments, if arguments changed function give * another resource */ declare const useCreateResource: any>(fetchFunc: T, deps?: any[], { isPreloadAfterCallRefetch, startFetchAtFirstRender, keepDataAliveWhenFetching, }?: Options) => UseCreateResourceResponse; export { useResource, useCreateResource }; //# sourceMappingURL=resource.d.ts.map