@whitesev/utils
Version:
一个常用的工具库
18 lines (17 loc) • 734 B
TypeScript
import type { WindowApiOption } from "./types/WindowApi";
export declare class WindowApi {
/** 默认的配置 */
private defaultApi;
/** 使用的配置 */
private api;
constructor(option?: WindowApiOption);
get document(): Document;
get window(): Window & typeof globalThis;
get globalThis(): typeof globalThis | Window;
get self(): Window & typeof globalThis;
get top(): Window;
get setTimeout(): (handler: TimerHandler, timeout?: number, ...arguments: any[]) => number;
get setInterval(): (handler: TimerHandler, timeout?: number, ...arguments: any[]) => number;
get clearTimeout(): (id: number | undefined) => void;
get clearInterval(): (id: number | undefined) => void;
}