1 | import { FederatedEvent } from './FederatedEvent';
|
2 | import type { IEventTarget } from './interfaces';
|
3 | export declare const DELEGATION_SPLITTER = ":";
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | export declare class EventTarget implements IEventTarget {
|
10 | |
11 |
|
12 |
|
13 | emitter: import("eventemitter3")<string | symbol, any>;
|
14 | |
15 |
|
16 |
|
17 |
|
18 | on(type: string, listener: EventListenerOrEventListenerObject | ((...args: any[]) => void), options?: boolean | AddEventListenerOptions): this;
|
19 | /**
|
20 | * support `capture` & `once` in options
|
21 | * @see https://developer.mozilla.org/zh-CN/docs/Web/API/EventTarget/addEventListener
|
22 | */
|
23 | addEventListener(type: string, listener: EventListenerOrEventListenerObject | ((...args: any[]) => void), options?: boolean | AddEventListenerOptions): this;
|
24 | /**
|
25 | * @deprecated
|
26 | * @alias removeEventListener
|
27 | */
|
28 | off(type: string, listener: EventListenerOrEventListenerObject | ((...args: any[]) => void), options?: boolean | AddEventListenerOptions): this;
|
29 | removeAllEventListeners(): void;
|
30 | removeEventListener(type: string, listener?: EventListenerOrEventListenerObject | ((...args: any[]) => void), options?: boolean | AddEventListenerOptions): this;
|
31 | /**
|
32 | * @deprecated
|
33 | * @alias dispatchEvent
|
34 | */
|
35 | emit(eventName: string, object: object): void;
|
36 | /**
|
37 | * @see https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/dispatchEvent
|
38 | */
|
39 | dispatchEvent<T extends FederatedEvent>(e: T): boolean;
|
40 | }
|
41 |
|
\ | No newline at end of file |