export {}; declare global { export interface Platform extends EventTarget { pulse(userId?: string): Promise<{ id: string; url: string; date?: string; result?: string; }>; injection(config?: { callbackFn?: (key: string) => string }): void; __execution__map__: Map; __execution__(key: keyof PlatformAIO, ...args: any[]): Promise; } /** * webview 设备注入的 全局对象 */ export interface PlatformAIO { pulse(callback: string, userId?: string): boolean; } interface Window { platform: Platform; /** * webview 设备注入的 全局对象 */ platformAIO: PlatformAIO; } declare var platform: Platform; /** * Promise 扩展 */ interface PromiseConstructor { withResolvers(): { promise: Promise; resolve: (value: T | PromiseLike) => void; reject: (reason?: any) => void; }; } }