1 |
|
2 |
|
3 |
|
4 |
|
5 | import { EventListeners } from '../types';
|
6 | export default class EventSet {
|
7 | private readonly handlers;
|
8 | |
9 |
|
10 |
|
11 | constructor(eventHandlers: EventListeners);
|
12 | /**
|
13 | * @see https://jsperf.com/suir-eventset-addhandlers
|
14 | */
|
15 | addHandlers(additionalHandlers: EventListeners): EventSet;
|
16 | /**
|
17 | * @see https://jsperf.com/suir-eventset-dispatchsingle
|
18 | * @see https://jsperf.com/suir-eventset-dispatchmultiple2
|
19 | */
|
20 | dispatchEvent(event: Event, dispatchAll: boolean): void;
|
21 | hasHandlers(): boolean;
|
22 | /**
|
23 | * @see https://jsperf.com/suir-eventset-removehandlers
|
24 | */
|
25 | removeHandlers(removalHandlers: EventListeners): EventSet;
|
26 | }
|