123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- export {};
- declare global {
- declare const Bridge: typeof import('./bridge').Bridge;
- 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<string, any>;
- __execution__<M>(key: keyof PlatformAIO, ...args: any[]): Promise<M>;
- }
- /**
- * webview 设备注入的 全局对象
- */
- export interface PlatformAIO {
- pulse(callback: string, userId?: string): boolean;
- }
- interface Window {
- /* six-aio 设备注入 */
- bridge: InstanceType<typeof import('./bridge').Bridge>;
- platform: Platform;
- /**
- * webview 设备注入的 全局对象
- */
- platformAIO: PlatformAIO;
- }
- declare var platform: Platform;
- /**
- * Promise 扩展
- */
- interface PromiseConstructor {
- withResolvers<T>(): {
- promise: Promise<T>;
- resolve: (value: T | PromiseLike<T>) => void;
- reject: (reason?: any) => void;
- };
- }
- }
|