utils.d.ts 1.08 KB
Newer Older
李嘉林 committed
1 2
/// <reference types="miniprogram-api-typings" />
export declare function range(num: number, min: number, max: number): number;
程默 committed
3 4
export declare function nextTick(cb: (...args: any[]) => void): void;
export declare function getSystemInfoSync(): WechatMiniprogram.GetSystemInfoSyncResult;
李嘉林 committed
5
export declare function addUnit(value?: string | number): string | undefined;
程默 committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
export declare function requestAnimationFrame(
  cb: () => void
): number | WechatMiniprogram.NodesRef;
export declare function pickExclude(obj: unknown, keys: string[]): {};
export declare function getRect(
  context: WechatMiniprogram.Component.TrivialInstance,
  selector: string
): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>;
export declare function getAllRect(
  context: WechatMiniprogram.Component.TrivialInstance,
  selector: string
): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>;
export declare function groupSetData(
  context: WechatMiniprogram.Component.TrivialInstance,
  cb: () => void
): void;
export declare function toPromise(
  promiseLike: Promise<unknown> | unknown
): Promise<unknown>;