import type { Ref } from '@stacksjs/stx'; /** * Reactive async state management. * Wraps an async function or promise with reactive loading/error/ready state. * * @param promise - Async function or promise to execute * @param initialState - Initial state value * @param options - Execution options */ export declare function useAsyncState(promise: (() => Promise) | Promise, initialState: T, options?: UseAsyncStateOptions): UseAsyncStateReturn; export declare interface UseAsyncStateOptions { immediate?: boolean onError?: (e: unknown) => void resetOnExecute?: boolean delay?: number } export declare interface UseAsyncStateReturn { state: Ref isReady: Ref isLoading: Ref error: Ref execute: (delay?: number) => Promise }