@squidcloud/backend
    Preparing search index...

    Function eventHandler

    • Decorator that marks a function as a handler for an emitted event of the given type.

      Events are emitted with SquidService.emitEvent and delivered over core's internal event stream, so multiple subscribers may handle the same event type. The handler receives the emitted event ({ id, type, payload }).

      Type Parameters

      • T = unknown

      Parameters

      • type: string

        The event type to subscribe to.

      Returns ActionMethodDecorator<EventHandlerAction<T>>