/** * Async function state */ export type AsyncFunctionState = { loading: boolean; error: Error | undefined; value: T | undefined; }; /** * Hook that provides manual control over async function execution * * @template TArgs - The argument types for the async function * @template TResult - The return type of the async function * @param fn - Async function to execute * @returns Tuple of [state, callback] * * @example * ```tsx * const [state, fetchUser] = useAsyncFn(async (userId: string) => { * const response = await fetch(`/api/users/${userId}`); * return response.json(); * }); * * // Later... * const handleClick = () => { * fetchUser('123'); * }; * ``` */ export declare function useAsyncFunction(function_: (...args: TArguments) => Promise): [AsyncFunctionState, (...args: TArguments) => Promise]; //# sourceMappingURL=useAsyncFunction.d.ts.map