Minor class Events (#1478)

* Fix the return value as boolean on Event

* Minor class Events
This commit is contained in:
扩散性百万甜面包
2019-10-12 11:16:27 +02:00
committed by Jaco Greeff
parent 0c96ba7a02
commit f7ca638a1a
+3 -7
View File
@@ -7,14 +7,10 @@ import { ApiInterfaceEvents } from '../types';
import EventEmitter from 'eventemitter3';
export default class Events {
private _eventemitter: EventEmitter;
private _eventemitter = new EventEmitter();
protected constructor () {
this._eventemitter = new EventEmitter();
}
protected emit (type: ApiInterfaceEvents, ...args: any[]): void {
this._eventemitter.emit(type, ...args);
protected emit (type: ApiInterfaceEvents, ...args: any[]): boolean {
return this._eventemitter.emit(type, ...args);
}
/**