import Core, { Config, SendOption, SendSuccess, SendFail, PayloadXHR, PayloadFetch } from '@tencent/aegis-core'; import './util/polyfill'; export interface WebConfig extends Config { asyncPlugin?: boolean; pagePerformance?: boolean | { urlHandler: () => string; }; reportApiSpeed?: boolean | { urlHandler: (url: string, payload: PayloadXHR | PayloadFetch) => string; }; reportAssetSpeed?: boolean; beforeReportSpeed?: Function; tjg?: boolean; offlineLog?: boolean; dbConfig?: any; offlineLogExp?: number; shadowLog?: any; getNetworkType?: Function; /** 当前页面是否是单页应用 */ spa?: boolean; } interface AsyncPluginOption { exportsConstructor?: string; onAegisInit?: (aegis: Core) => void; onAegisInitAndPluginLoaded?: (aegis: Aegis, exportsConstructor?: Function) => void; } export default class Aegis extends Core { static __version__: string; static sessionID: string; constructor(config: WebConfig); getBean(filter?: string[]): string; requestQueue: { options: SendOption; success?: SendSuccess; fail?: SendFail; }[]; requesting: boolean; send(options: SendOption, success?: SendSuccess, fail?: SendFail): void; speedLogPipeline: import("../../core/src").Pipeline; private static asyncPlugin; static useAsyncPlugin(url: string, options?: AsyncPluginOption): void; uploadLogs(params?: any, conds?: any): void; static urls: { [key: string]: string; }; } export {};