utils.d.ts 1.4 KB

1234567891011121314
  1. /// <reference types="miniprogram-api-typings" />
  2. /// <reference types="node" />
  3. export { isDef } from './validator';
  4. export declare function range(num: number, min: number, max: number): number;
  5. export declare function nextTick(cb: (...args: any[]) => void): void;
  6. export declare function getSystemInfoSync(): WechatMiniprogram.SystemInfo;
  7. export declare function addUnit(value?: string | number): string | undefined;
  8. export declare function requestAnimationFrame(cb: () => void): NodeJS.Timeout | WechatMiniprogram.NodesRef;
  9. export declare function pickExclude(obj: unknown, keys: string[]): {};
  10. export declare function getRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;
  11. export declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;
  12. export declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void;
  13. export declare function toPromise(promiseLike: Promise<unknown> | unknown): Promise<unknown>;
  14. 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;