import type { AsyncState, UseAsyncActions, UseAsyncMeta } from '../useAsync/index.js'; export type UseAsyncAbortableActions = { /** * Abort the currently running async function invocation. */ abort: () => void; /** * Abort the currently running async function invocation and reset state to initial. */ reset: () => void; } & UseAsyncActions; export type UseAsyncAbortableMeta = { /** * Currently used `AbortController`. New one is created on each execution of the async function. */ abortController: AbortController | undefined; } & UseAsyncMeta; export type ArgsWithAbortSignal = [AbortSignal, ...Args]; export declare function useAsyncAbortable(asyncFn: (...params: ArgsWithAbortSignal) => Promise, initialValue: Result): [AsyncState, UseAsyncAbortableActions, UseAsyncAbortableMeta]; export declare function useAsyncAbortable(asyncFn: (...params: ArgsWithAbortSignal) => Promise, initialValue?: Result): [AsyncState, UseAsyncAbortableActions, UseAsyncAbortableMeta];