import { ReportItem, ReportItemType } from '@tencent/merlin-core'; import { ErrorReportStatus } from './common'; export interface StackFrame { filename?: string; func?: string; lineno?: number; colno?: number; } /** 实现底层的标准错误事件 */ export interface ErrorIssue { /** 事件 Id */ id?: string; /** 名称 */ name?: string; /** 事件详情 */ message?: string; /** 错误发生时间戳 */ timestamp?: number; /** 原始错误栈 */ stack?: string; /** 标准化错误栈 */ stackFrames?: StackFrame[]; /** 出错文件 */ file?: string; /** 出错行号 */ line?: number; /** 出错列号 */ col?: number; /** 内置索引 1 */ sysIdx1?: string; /** 内置索引 1 */ sysIdx2?: string; /** 内置索引 1 */ sysIdx3?: string; } export type ErrorReportItemData = ErrorIssue & { /** 额外日志信息 */ log?: string; /** 索引字段 1 */ idx1?: string; /** 索引字段 2 */ idx2?: string; /** 索引字段 3 */ idx3?: string; /** 错误状态 */ status?: ErrorReportStatus; }; export interface ErrorReportItem extends ReportItem { type: ReportItemType.ERROR; }