• Emits an event synchronous.

    Parameters

    • target: any

      the channel object.

    • eventName: EventIdentifier

      event name

    • ...event: [] | [unknown]

      the event arguments

    Returns void

    // object as event channel
    const channel = {};

    // connect to event "changed"
    on(channel, "changed", (msg)=> console.log(msg));

    // fire changed event
    emitSync(channel, "changed", "my event msg");