1
- import type { Constructor } from 'lowclass' ;
1
+ import type { Constructor } from 'lowclass/dist/Constructor.js ' ;
2
2
/**
3
3
* @mixin
4
4
* @class Eventful - An instance of Eventful emits events that code can
@@ -33,6 +33,7 @@ import type { Constructor } from 'lowclass';
33
33
*/
34
34
export declare function Eventful < T extends Constructor > ( Base ?: T ) : {
35
35
new ( ...a : any [ ] ) : {
36
+ "__#1@#eventMap" : Map < string , Set < [ Function , any ] > > | null ;
36
37
/**
37
38
* @method on - Register a `callback` to be executed any
38
39
* time an event with name `eventName` is triggered by an instance of
@@ -72,23 +73,6 @@ export declare function Eventful<T extends Constructor>(Base?: T): {
72
73
* @param {data } any - The data that is passed to each callback subscribed to the event.
73
74
*/
74
75
emit ( eventName : string , data ?: any ) : void ;
75
- "__#1@#eventMap" : Map < string , Array < [ Function , any ] > > | null ;
76
76
} ;
77
77
} & T ;
78
- /**
79
- * @decorator
80
- * @function emits - This is a decorator that when used on a property in a
81
- * class definition, causes setting of that property to emit the specified
82
- * event, with the event payload being the property value. This decorator must
83
- * be used in a class that extends from Eventful, otherwise an error is thrown.
84
- *
85
- * @example
86
- * class Foo {
87
- * @emits ('propchange') foo = 123
88
- * }
89
- * const f = new Foo
90
- * f.on('propchange', value => console.log('value: ', value))
91
- * f.foo = 456 // logs "value: 456"
92
- */
93
- export declare function emits ( eventName : string ) : any ;
94
78
//# sourceMappingURL=Eventful.d.ts.map
0 commit comments