t-comm
Version:
专业、稳定、纯粹的工具库
37 lines (36 loc) • 856 B
TypeScript
declare enum ReportType {
PERFORMANCE = 1,
BUNDLE = 2,
AUTO_TEST = 3,
BUNDLE_MP = 4
}
declare enum ReportPlatform {
NOT_KNOWN = 0,
H5 = 1,
MP = 2
}
/**
* 上报数据到研发平台
* @param {object} param 参数
* @param {object} param.data 上报数据
* @param {string} param.host 请求域名
* @param {ReportType} param.type 上报类型
* @param {ReportPlatform} param.platform 上报平台
* @returns 上报结果
* @example
* ```ts
* await reportToRdPlatform({
* data: { metric: 'fcp', value: 1234 },
* host: 'https://your-host.example.com',
* type: 1, // PERFORMANCE
* platform: 1, // H5
* });
* ```
*/
export declare function reportToRdPlatform({ data, host, type, platform, }: {
data: any;
host: any;
type?: ReportType;
platform?: ReportPlatform;
}): Promise<any>;
export {};