declare type Nullable<TReturn> = TReturn | null;
declare type Arguments<TArgs> = TArgs & {
    enabled?: boolean;
    watch?: boolean;
};
interface Options<TArgs, TReturn> {
    fetchFn: (args: TArgs) => Promise<Nullable<TReturn>>;
    watchFn?: (args: TArgs, callback: (watchData: Nullable<TReturn>) => void) => () => void;
    args: Arguments<TArgs>;
    hasRequiredArgs?: boolean;
}
export declare function useAsyncController<TArgs, TReturn>({ fetchFn, watchFn, args, hasRequiredArgs }: Options<TArgs, TReturn>): {
    data: TReturn | undefined;
    onFetch: (newArgs?: TArgs) => Promise<Nullable<TReturn> | undefined>;
    isLoading: boolean;
    error: Error | undefined;
};
export {};
