/** The stateful callable every write/dispatch hook returns. */ export interface Action { /** Invoke; rejects on failure AND records it on `.error`. */ (...args: A): Promise; /** ≥1 invocation in flight (the OR across concurrent calls). */ readonly pending: boolean; /** Last rejection; cleared when the next invocation starts. */ readonly error: unknown; /** Last successful resolution. */ readonly result: R | undefined; /** Clears error/result. */ reset(): void; } /** * Wrap an async function in the Action envelope. Concurrent invocations are * allowed — each returns its own promise; `pending` is the OR of the in-flight * count and `result`/`error` reflect the latest settlement. The callable keeps * ONE identity for the hook's lifetime (safe in deps arrays); its snapshot * fields are re-stamped each render, so reads stay current across settlements. */ export declare function useAction(fn: (...args: A) => Promise): Action; //# sourceMappingURL=action.d.ts.map