interface AsyncOpt {
    condition: boolean;
    deps: any[];
    interval?: number;
}
export interface AsyncRes<F extends () => ReturnType<F>> {
    res?: Awaited<ReturnType<F>>;
    error?: string;
    loading: boolean;
}
/**
 * allows us to easily call async functions inside hooks
 * @param  {Function} fn         function we want to call
 * @param  {Array} args       fn arguments
 * @param  {opt}  { condition: only execute if condition is true, deps: additional execution deps }
 * @return {error: String, result: Any, loading: boolean} return object
 */
export declare function useAsync<F extends (...args: any[]) => ReturnType<F>>(fn: F | undefined, args: Parameters<F>, opt?: AsyncOpt): AsyncRes<F>;
export {};
