/**
 * useAsyncEffect — AbortController-based async effect hook.
 *
 * Automatically aborts in-flight async work when the effect re-runs
 * or the component unmounts. Prevents stale state writes from
 * completed promises that arrive after the component has moved on.
 *
 * Usage:
 *   useAsyncEffect(async (signal) => {
 *     const data = await fetch(url, { signal });
 *     if (!signal.aborted) setData(data);
 *   }, [url]);
 *
 * Errors thrown by the effect (other than AbortError) are forwarded to
 * `onError` if provided. The default behavior is unchanged: log to file
 * only. Pass `onError: (err) => store.setScreenError(err)` (or any other
 * surfacing path) when an effect's failure should reach the user instead
 * of disappearing into the log.
 */
import { type DependencyList } from 'react';
export interface UseAsyncEffectOptions {
    /**
     * Called when the effect throws a non-abort error. Use this to surface
     * failures to the user (e.g. by routing into the screen error boundary
     * via `store.setScreenError`). When omitted, errors are only logged to
     * file — the historical behavior.
     */
    onError?: (err: unknown) => void;
}
export declare function useAsyncEffect(effect: (signal: AbortSignal) => Promise<void>, deps: DependencyList, options?: UseAsyncEffectOptions): void;
