utils.d.ts 1.5 KB

1234567891011121314151617
  1. /// <reference types="node" />
  2. /// <reference types="miniprogram-api-typings" />
  3. /// <reference types="miniprogram-api-typings" />
  4. /// <reference types="miniprogram-api-typings" />
  5. /// <reference types="miniprogram-api-typings" />
  6. export { isDef } from './validator';
  7. export { getSystemInfoSync } from './version';
  8. export declare function range(num: number, min: number, max: number): number;
  9. export declare function nextTick(cb: (...args: any[]) => void): void;
  10. export declare function addUnit(value?: string | number): string | undefined;
  11. export declare function requestAnimationFrame(cb: () => void): NodeJS.Timeout;
  12. export declare function pickExclude(obj: unknown, keys: string[]): {};
  13. export declare function getRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;
  14. export declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;
  15. export declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void;
  16. export declare function toPromise(promiseLike: Promise<unknown> | unknown): Promise<unknown>;
  17. export declare function getCurrentPage<T>(): T & WechatMiniprogram.OptionalInterface<WechatMiniprogram.Page.ILifetime> & WechatMiniprogram.Page.InstanceProperties & WechatMiniprogram.Page.InstanceMethods<WechatMiniprogram.IAnyObject> & WechatMiniprogram.Page.Data<WechatMiniprogram.IAnyObject> & WechatMiniprogram.IAnyObject;