UNPKG

@goparrot/pubsub-event-bus

Version:
19 lines 668 B
import { AbstractSubscriptionEvent } from './AbstractSubscriptionEvent'; export class AbstractPubsubEvent extends 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; }; } } //# sourceMappingURL=AbstractPubsubEvent.js.map