import { DependencyList, EffectCallback } from 'react';

export type AsyncDestructor = Promise<(() => void) | void>;
/** An async version of React.EffectCallback */
export type AsyncEffectCallback = () => AsyncDestructor;
/**
 * A version of useEffect that supports async functions and destructors. NOTE: The behavior
 * of this hook hasn't been carefully though out, so it may produce unexpected results.
 * Caveat emptor.
 *
 * @param effect - The async effect callback.
 * @param deps - The dependencies of the effect.
 */
export declare const useAsyncEffect: (effect: AsyncEffectCallback, deps?: unknown[]) => void;
export declare const useEffectCompare: <D extends DependencyList>(cbk: EffectCallback, areEqual: (prevDeps: D, nextDeps: D) => boolean, deps: D) => void;
//# sourceMappingURL=effect.d.ts.map