@goparrot/pubsub-event-bus
Version:
NestJS EventBus extension for RabbitMQ PubSub
23 lines • 858 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.AbstractPubsubEvent = void 0;
const AbstractSubscriptionEvent_1 = require("./AbstractSubscriptionEvent");
class AbstractPubsubEvent extends AbstractSubscriptionEvent_1.AbstractSubscriptionEvent {
constructor() {
super(...arguments);
this.options = {};
this.fireLocally = false;
this.getOptions = () => this.options;
this.withOptions = (extra) => {
this.options = { ...this.options, ...extra };
return this;
};
this.localEventEnabled = () => this.fireLocally;
this.withLocalEvent = (allow = true) => {
this.fireLocally = allow;
return this;
};
}
}
exports.AbstractPubsubEvent = AbstractPubsubEvent;
//# sourceMappingURL=AbstractPubsubEvent.js.map