Skip to main content

Function: OnEvent()

OnEvent(type?): (target, propertyKey, descriptor) => void

Defined in: service-core/src/decorators/EventDecorators.ts:12

Apply this to a function that will be called when events arrive for the specified type(s). If no event type is specified, then the function will be called upon each event that arrives.

Parameters

type?

string | string[]

The name or list of names corresponding to events that the function will handle.

Returns

(target, propertyKey, descriptor) => void