import { Level } from './Queue'; export interface Context { version: string; } export interface Config { project: string; apiUrl: string; delay: number; } export declare type LogLevel = Level; export default class ApplicationInsights { static queue: any; static apiUrl: any; config: Config; context: Context; isBindUnload: boolean; timer: any; constructor(config: any, context: Context); /** * 收集信息 * @param level 'error' | 'warn' | 'info' * @param data 数据 * @param label 其他信息 * @param updateId id */ track(level: Level, data: any, label?: string, updateId?: string): any; /** * 对收集的信息进行处理 * @private */ private _collectHandle; /** * 调用接口,上传日志信息,并清空已经上传的 */ private static _singlePolling; /** * 调用接口,上传日志信息,并清空已经上传的 * @private */ private _polling; /** * unload 后的回调函数,处理剩余的日志信息 * @private */ private _onUnload; }