From 2dd00c414268cbd1da8bcbc37cdf3edbfc2d0d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Tue, 8 Aug 2023 12:23:11 +0200 Subject: [PATCH] fix: make context optional --- src/event-bus.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/event-bus.ts b/src/event-bus.ts index da099d19..f9951fb4 100644 --- a/src/event-bus.ts +++ b/src/event-bus.ts @@ -75,7 +75,7 @@ export class EventBus */ publish( event: TEvent, - context: TContext, + context?: TContext, ) { return this._publisher.publish(event, context); } @@ -86,7 +86,7 @@ export class EventBus */ publishAll( events: TEvent[], - context: TContext, + context?: TContext, ) { if (this._publisher.publishAll) { return this._publisher.publishAll(events);