zarm
Version:
基于 React 的移动端UI库
20 lines (19 loc) • 794 B
TypeScript
interface IEEvent {
attachEvent(event: string, listener: EventListener): boolean;
detachEvent(event: string, listener: EventListener): void;
}
declare global {
interface Element extends IEEvent {
}
interface Window extends IEEvent {
}
interface Document extends IEEvent {
}
}
declare const _default: {
supportsPassiveEvents: boolean;
on(el: Window | Document | Element, type: string, callback: EventListener, options?: AddEventListenerOptions | boolean): void;
off(el: Window | Document | Element, type: string, callback: EventListener, options?: AddEventListenerOptions | boolean): void;
once(el: Window | Document | Element, type: string, callback: EventListener, options?: AddEventListenerOptions | boolean): void;
};
export default _default;