Skip to content

Commit 07049a6

Browse files
committed
fix type error for latest typescript, and simplify some things
1 parent d5d57c0 commit 07049a6

16 files changed

+327
-346
lines changed

dist/Eventful.d.ts

+1-17
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import type { Constructor } from 'lowclass/dist/Constructor.js';
3333
*/
3434
export declare function Eventful<T extends Constructor>(Base?: T): {
3535
new (...a: any[]): {
36+
"__#1@#eventMap": Map<string, Set<[Function, any]>> | null;
3637
/**
3738
* @method on - Register a `callback` to be executed any
3839
* 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): {
7273
* @param {data} any - The data that is passed to each callback subscribed to the event.
7374
*/
7475
emit(eventName: string, data?: any): void;
75-
"__#1@#eventMap": Map<string, Array<[Function, any]>> | null;
7676
};
7777
} & 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;
9478
//# sourceMappingURL=Eventful.d.ts.map

dist/Eventful.d.ts.map

+1-1
Original file line numberDiff line numberDiff line change

dist/Eventful.js

+21-150
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Eventful.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)