1 | import type { Fn } from "./fn.js";
|
2 | import type { IID } from "./id.js";
|
3 | /**
|
4 | * Event listener.
|
5 | */
|
6 | export declare type Listener = Fn<Event, void>;
|
7 | export interface Event extends IID<PropertyKey> {
|
8 | target?: any;
|
9 | canceled?: boolean;
|
10 | value?: any;
|
11 | }
|
12 | /**
|
13 | * Interface to provide event emitter functionality. Also see
|
14 | * {@link INotifyMixin} decorator mixin.
|
15 | */
|
16 | export interface INotify {
|
17 | addListener(id: string, fn: Listener, scope?: any): boolean;
|
18 | removeListener(id: string, fn: Listener, scope?: any): boolean;
|
19 | notify(event: Event): void;
|
20 | }
|
21 | //# sourceMappingURL=event.d.ts.map |
\ | No newline at end of file |