Function emit

  • calls each of the listeners registered for a given event.

    Parameters

    • eventName: string | symbol

      The event name.

    • Optional Rest...args: any[]

      arguments to be passed to all listeners

    Returns boolean

    true if the event had listeners, false otherwise.

    event.emit

    me.event.emit("event-name", a, b, c);