import { ExtendableError } from '../class/Error/ExtendableError'; /** * ConnectionError构造函数参数类型 * @internal * @category 请求 */ interface IAjaxContext { /** * 请求状态码 */ status?: XMLHttpRequest['status']; xhr?: XMLHttpRequest; message?: string; } /** * @category 请求 */ export declare class ConnectionError extends ExtendableError { context: IAjaxContext; /** * 状态码 */ code: number; /** * @param context 连接上下文 */ constructor(context?: IAjaxContext); static TIMEOUT_MSG: string; static OFFLINE_MSG: string; static CLOSE_MSG: string; static UNKNOWN_MSG: string; /** * 尝试给出更友好的提示消息 */ static EnhanceMessage({ status, xhr, message, }: IAjaxContext): string; } export {};