global.d.ts 585 B

1234567891011121314151617181920212223242526
  1. export {};
  2. declare global {
  3. declare const Bridge: typeof import('./bridge').Bridge;
  4. interface Window {
  5. /* six-aio 设备注入 */
  6. bridge: InstanceType<typeof import('./bridge').Bridge>;
  7. /**
  8. * webview 设备注入的 全局对象(历史遗留)
  9. * @deprecated 使用 bridge
  10. */
  11. AIO: Partial<import('./bridge').globalAIO>;
  12. }
  13. /**
  14. * Promise 扩展
  15. */
  16. interface PromiseConstructor {
  17. withResolvers<T>(): {
  18. promise: Promise<T>;
  19. resolve: (value: T | PromiseLike<T>) => void;
  20. reject: (reason?: any) => void;
  21. };
  22. }
  23. }