@nestjs/cqrs 10.2.1 → 10.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/event-bus.d.ts +2 -2
- package/dist/event-bus.js +1 -1
- package/package.json +1 -1
package/dist/event-bus.d.ts
CHANGED
|
@@ -31,12 +31,12 @@ export declare class EventBus<EventBase extends IEvent = IEvent> extends Observa
|
|
|
31
31
|
* Publishes an event.
|
|
32
32
|
* @param event The event to publish.
|
|
33
33
|
*/
|
|
34
|
-
publish<TEvent extends EventBase, TContext = unknown>(event: TEvent, context
|
|
34
|
+
publish<TEvent extends EventBase, TContext = unknown>(event: TEvent, context?: TContext): any;
|
|
35
35
|
/**
|
|
36
36
|
* Publishes multiple events.
|
|
37
37
|
* @param events The events to publish.
|
|
38
38
|
*/
|
|
39
|
-
publishAll<TEvent extends EventBase, TContext = unknown>(events: TEvent[], context
|
|
39
|
+
publishAll<TEvent extends EventBase, TContext = unknown>(events: TEvent[], context?: TContext): any;
|
|
40
40
|
bind(handler: IEventHandler<EventBase>, id: string): void;
|
|
41
41
|
registerSagas(types?: Type<unknown>[]): void;
|
|
42
42
|
register(handlers?: EventHandlerType<EventBase>[]): void;
|
package/dist/event-bus.js
CHANGED
|
@@ -64,7 +64,7 @@ let EventBus = EventBus_1 = class EventBus extends utils_1.ObservableBus {
|
|
|
64
64
|
*/
|
|
65
65
|
publishAll(events, context) {
|
|
66
66
|
if (this._publisher.publishAll) {
|
|
67
|
-
return this._publisher.publishAll(events);
|
|
67
|
+
return this._publisher.publishAll(events, context);
|
|
68
68
|
}
|
|
69
69
|
return (events || []).map((event) => this._publisher.publish(event, context));
|
|
70
70
|
}
|