Skip to content

API reference / @chanx-js/nestjs / OnEvent

Function: OnEvent() ​

ts
function OnEvent<D, O>(message, options?): HandlerDecorator<O>;

Defined in: packages/nestjs/src/decorators.ts:93

Handle a server-side event from the channel layer.

Type Parameters ​

Type ParameterDefault type
D extends AnyMessageDefinition-
O extends Outputsnever

Parameters ​

ParameterType
messageD
options?HandlerOptions<O>

Returns ​

HandlerDecorator<O>

MIT licensed