import Status from './Status'; /** * Creates a hook used to fetch data. * * @param fetch - The fetching function. It will be a noop if the value may be undefined. This will prevent * from the need to put the hook in a conditional loop. * @returns The created hook. */ declare function useFetcher(fetch: (() => Promise) | undefined): [T | undefined, Status]; /** * Creates a hook used to fetch data. * * @param fetch - The fetching function. It will be a noop if the value may be undefined. This will prevent * from the need to put the hook in a conditional loop. * @param defaultValue - The value to return while not resolved. * @returns The created hook. */ declare function useFetcher(fetch: (() => Promise) | undefined, defaultValue: T): [T, Status]; export default useFetcher;