/** * API 调用错误 */ export declare class ApiError extends Error { statusCode: number; code?: string | undefined; details?: any | undefined; constructor(message: string, statusCode: number, code?: string | undefined, details?: any | undefined); } /** * 输入验证错误 */ export declare class ValidationError extends Error { field?: string | undefined; constructor(message: string, field?: string | undefined); } /** * 未认证错误 */ export declare class AuthenticationError extends Error { constructor(message?: string); } /** * 统一错误处理器 */ export declare function handleError(error: unknown): never; /** * 从 Axios 错误创建 ApiError */ export declare function createApiError(error: any): ApiError; /** * 包装异步函数,自动处理错误 */ export declare function withErrorHandling Promise>(fn: T): T; //# sourceMappingURL=error.d.ts.map