MessageHandler


interface MessageHandler<TInput = any, TContext = any, TResult = any> {
  next?: (data: TInput, ctx?: TContext) => Promise<Observable<TResult>> | Promise<TResult>
  isEventHandler?: boolean
  extras?: Record<string, any>
  (data: TInput, ctx?: TContext): Promise<Observable<TResult>> | Promise<TResult>
}

Properties

Property Description
next?: (data: TInput, ctx?: TContext) => Promise<Observable<TResult>> | Promise<TResult>
isEventHandler?: boolean
extras?: Record<string, any>

Methods

call signature


(data: TInput, ctx?: TContext): Promise<Observable<TResult>> | Promise<TResult>

Parameters

Option Type Description
data TInput
ctx TContext

Optional. Default is undefined.

Returns

Promise<Observable<TResult>> | Promise<TResult>