import { ErrorCode } from './errors/ErrorCodes';
export { ErrorCode, ErrorMessages, getErrorMessage, getUserFriendlyMessage } from './errors/ErrorCodes';
/**
 * 错误类型枚举
 */
export declare enum ErrorType {
    /**
     * 初始化错误
     */
    INITIALIZATION = "INITIALIZATION",
    /**
     * 配置错误
     */
    CONFIG = "CONFIG",
    /**
     * 存储错误
     */
    STORAGE = "STORAGE",
    /**
     * 网络错误
     */
    NETWORK = "NETWORK",
    /**
     * 验证错误
     */
    VALIDATION = "VALIDATION",
    /**
     * 安全错误
     */
    SECURITY = "SECURITY",
    /**
     * 运行时错误
     */
    RUNTIME = "RUNTIME",
    /**
     * 未知错误
     */
    UNKNOWN = "UNKNOWN"
}
/**
 * 错误严重程度
 */
export declare enum ErrorSeverity {
    /**
     * 低 - 不影响核心功能
     */
    LOW = "LOW",
    /**
     * 中 - 影响部分功能
     */
    MEDIUM = "MEDIUM",
    /**
     * 高 - 影响核心功能
     */
    HIGH = "HIGH",
    /**
     * 严重 - 导致应用无法使用
     */
    CRITICAL = "CRITICAL"
}
/**
 * 框架错误基类
 */
export declare class FrameworkError extends Error {
    /**
     * 错误类型
     */
    readonly type: ErrorType;
    /**
     * 错误严重程度
     */
    readonly severity: ErrorSeverity;
    /**
     * 错误代码
     */
    readonly code: string;
    /**
     * 原始错误
     */
    readonly originalError?: Error;
    /**
     * 错误上下文
     */
    readonly context?: Record<string, unknown>;
    /**
     * 是否可恢复
     */
    readonly recoverable: boolean;
    constructor(message: string, type?: ErrorType, severity?: ErrorSeverity, options?: {
        code?: string;
        originalError?: Error;
        context?: Record<string, unknown>;
        recoverable?: boolean;
    });
    /**
     * 转换为 JSON
     */
    toJSON(): Record<string, unknown>;
}
/**
 * 初始化错误
 */
export declare class InitializationError extends FrameworkError {
    constructor(message: string, originalError?: Error, context?: Record<string, unknown>, errorCode?: ErrorCode);
}
/**
 * 配置错误
 */
export declare class ConfigError extends FrameworkError {
    constructor(message: string, originalError?: Error, context?: Record<string, unknown>, errorCode?: ErrorCode);
}
/**
 * 存储错误
 */
export declare class StorageError extends FrameworkError {
    constructor(message: string, originalError?: Error, context?: Record<string, unknown>);
}
/**
 * 网络错误
 */
export declare class NetworkError extends FrameworkError {
    constructor(message: string, originalError?: Error, context?: Record<string, unknown>, errorCode?: ErrorCode);
}
/**
 * 验证错误
 */
export declare class ValidationError extends FrameworkError {
    constructor(message: string, context?: Record<string, unknown>);
}
/**
 * 安全错误
 */
export declare class SecurityError extends FrameworkError {
    constructor(message: string, originalError?: Error, context?: Record<string, unknown>);
}
/**
 * 错误处理工具函数
 */
export declare const errorUtils: {
    /**
     * 判断错误是否可恢复
     */
    isRecoverable(error: unknown): boolean;
    /**
     * 获取错误类型
     */
    getErrorType(error: unknown): ErrorType;
    /**
     * 获取错误严重程度
     */
    getErrorSeverity(error: unknown): ErrorSeverity;
    /**
     * 标准化错误对象
     */
    normalizeError(error: unknown): FrameworkError;
    /**
     * 提取错误信息
     */
    extractErrorInfo(error: unknown): {
        message: string;
        type: ErrorType;
        severity: ErrorSeverity;
        code: string;
        stack?: string;
    };
    /**
     * 获取错误修复建议
     *
     * 优化：根据错误类型和代码提供修复建议
     */
    getErrorSuggestions(error: unknown): string[];
    /**
     * 格式化错误信息（用于开发环境）
     *
     * 优化：提供更详细的错误信息，包括修复建议
     */
    formatErrorForDev(error: unknown): string;
};
//# sourceMappingURL=errors.d.ts.map