Skip to content

Commit

Permalink
fix: make context optional
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Aug 8, 2023
1 parent 0030c63 commit 2dd00c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/event-bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class EventBus<EventBase extends IEvent = IEvent>
*/
publish<TEvent extends EventBase, TContext = unknown>(
event: TEvent,
context: TContext,
context?: TContext,
) {
return this._publisher.publish(event, context);
}
Expand All @@ -86,7 +86,7 @@ export class EventBus<EventBase extends IEvent = IEvent>
*/
publishAll<TEvent extends EventBase, TContext = unknown>(
events: TEvent[],
context: TContext,
context?: TContext,
) {
if (this._publisher.publishAll) {
return this._publisher.publishAll(events);
Expand Down

0 comments on commit 2dd00c4

Please sign in to comment.