import { WatchSource, WatchOptions, MaybeRef } from 'vue';
export type FetchResult<V, E = unknown> = {
    loading: boolean;
    value: V | undefined;
    error: E;
};
/**
 * Watch any reactive source and perform an asynchronous operation
 *
 * @example
 * ```ts
 * const v = useWatchFetch(
 *   watchSource,
 *   async (sourceValue) => {
 *     return await fetchDataFromApi(sourceValue);
 *   }
 * );
 *
 * // Usage in a template
 * <template>
 *   <div v-if="v.loading">Loading...</div>
 *   <div v-else-if="v.error">Error: {{ v.error.message }}</div>
 *   <div v-else>Data: {{ v.value }}</div>
 * </template>
 * ```
 */
export declare function useWatchFetch<S, V>(watchSource: WatchSource<S>, doFetch: (s: S) => Promise<V>, settings?: {
    watchOptions?: WatchOptions;
    debounce?: MaybeRef<number>;
    filterWatchResult?: (s: S) => boolean;
}): FetchResult<V>;
