update dependencies and generate typings (#44)

This commit is contained in:
yz-yu
2026-04-01 12:00:00 +08:00
committed by GitHub
parent ca61d6b19e
commit 329de4e9f7
11 changed files with 278 additions and 11 deletions

8
typings/utils.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
import { Mirror, throttleOptions, listenerHandler, hookResetter } from './types';
export declare function on(type: string, fn: EventListenerOrEventListenerObject, target?: Document | Window): listenerHandler;
export declare const mirror: Mirror;
export declare function throttle<T>(func: (arg: T) => void, wait: number, options?: throttleOptions): () => void;
export declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor): hookResetter;
export declare function getWindowHeight(): number;
export declare function getWindowWidth(): number;
export declare function isBlocked(node: Node | null): boolean;