utils.d.ts 957 B

12345678910111213141516171819
  1. /// <reference types="wechat-miniprogram" />
  2. export declare function isDef(value: any): boolean;
  3. export declare function isObj(x: any): boolean;
  4. export declare function range(num: number, min: number, max: number): number;
  5. export declare function nextTick(fn: Function): void;
  6. export declare function getSystemInfoSync(): WechatMiniprogram.GetSystemInfoSyncResult;
  7. export declare function addUnit(value?: string | number): string | undefined;
  8. export declare function requestAnimationFrame(
  9. cb: Function
  10. ): void | WechatMiniprogram.NodesRef;
  11. export declare function pickExclude(obj: unknown, keys: string[]): {};
  12. export declare function getRect(
  13. this: WechatMiniprogram.Component.TrivialInstance,
  14. selector: string
  15. ): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;
  16. export declare function getAllRect(
  17. this: WechatMiniprogram.Component.TrivialInstance,
  18. selector: string
  19. ): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;