From e8e22acb391c5f558e029caae33b47258b80edc5 Mon Sep 17 00:00:00 2001 From: Konasov Dmitriy Date: Thu, 26 May 2022 20:43:33 +0300 Subject: [PATCH] fix(microservices): Fixed typings for MessageHandler --- .../interfaces/message-handler.interface.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/microservices/interfaces/message-handler.interface.ts b/packages/microservices/interfaces/message-handler.interface.ts index d8152e2f8fd..00aecaa6e2c 100644 --- a/packages/microservices/interfaces/message-handler.interface.ts +++ b/packages/microservices/interfaces/message-handler.interface.ts @@ -1,8 +1,13 @@ import { Observable } from 'rxjs'; export interface MessageHandler { - (data: TInput, ctx?: TContext): Promise>; - next?: (data: TInput, ctx?: TContext) => Promise>; + (data: TInput, ctx?: TContext): + | Promise> + | Promise; + next?: ( + data: TInput, + ctx?: TContext, + ) => Promise> | Promise; isEventHandler?: boolean; extras?: Record; }