///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
declare namespace my {
/**
* 节点查询 https://docs.alipay.com/mini/api/selector-query
*/
interface IBoundingClientRect {
width: number;
height: number;
top?: number;
right?: number;
bottom?: number;
left?: number;
}
type ScrollOffset = Record<"scrollTop" | "scrollLeft", number>;
type SelectorResult = ReadonlyArray<
null
| Readonly
| Readonly
>;
type ISelectorExecCallback = (ret: SelectorResult) => void;
interface ISelectorQuery {
select(selector: string): ISelectorQuery;
selectAll(selector: string): ISelectorQuery;
selectViewport(): ISelectorQuery;
boundingClientRect(): ISelectorQuery;
scrollOffset(): ISelectorQuery;
exec(ret: ISelectorExecCallback): void;
}
function createSelectorQuery(params?: Record): ISelectorQuery;
function canIUse(query: string): boolean;
function reportCustomError(error: Error): void;
function call(apiName: string, params?: Record | ((...args: any[]) => void)): void;
function call(apiName: string, params?: Record, callback?: (...args: any[]) => void): void;
}