Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Emitter<Events>

An emitter of events.

Type parameters

  • Events

Hierarchy

Index

Methods

Methods

on

  • Subscribes a handler for events emitted by the CMS. The type of the emitted value depends on the emitted event.

    Parameters

    • eventName: keyof Events

      the name of the emitted event.

    • handler: EventHandler<Events>

      the function to call with the emitted value.

    Returns UnsubscribeFn

    A function to unsubscribe the handler again.