import { ActionName, SetFunction, GetFunction } from '../createStore.js'; import 'vue'; /***************************************************************** * ZENON - Minimal Zustand-like State Manager for Vue 3 * (c) 2025-present AGUMON (https://github.com/ljlm0402/zenon) * * This source code is licensed under the MIT license. * See the LICENSE file in the project root for more information. * * Made with ❤️ by AGUMON 🦖 *****************************************************************/ type ErrorBoundaryOptions = { /** * Error handler callback */ onError: (error: Error, actionName: ActionName, context: "set" | "get") => void; /** * Whether to prevent state rollback on error (default: false) */ preventRollback?: boolean; /** * Whether to rethrow errors after handling (default: true) */ rethrow?: boolean; }; /** * Middleware that wraps store actions with error boundary * @param options - Error boundary options */ declare function withErrorBoundary>(options: ErrorBoundaryOptions): (initializer: (set: SetFunction, get: GetFunction) => T) => (set: SetFunction, get: GetFunction) => T; export { type ErrorBoundaryOptions, withErrorBoundary };