Title here
Summary here
This rule checks if class is well declared and prevents usage of event buses in other class than Service
or Application
.
export default $WtvObject.declare("MyClass", { // MyClass is not a service
properties: {
eventBus: {
class: $EventBus
}
},
constructor: function () {
this.eventBus.subscribe('some.event', this._onSomeEventEmitted, this);
}
});
export default $Abstract.declare("MyService", { // MyService is a service
properties: {
eventBus: {
class: $EventBus
}
},
constructor: function () {
this.eventBus.subscribe("some.event", this._onSomeEventEmitted, this);
}
});