Type Alias Events

Events: {
    emit: (<EventName>(event: JimpexEventName, payload: JimpexEventPayload<EventName>) => void);
    on: (<EventName>(eventName: EventName, listener: JimpexEventListener<EventName>) => (() => boolean));
    once: (<EventName>(eventName: EventName, listener: JimpexEventListener<EventName>) => (() => boolean));
    reduce: (<EventName>(event: JimpexReducerEventName, target: JimpexReducerEventTarget<EventName>, payload: JimpexReducerEventPayload<EventName>) => Promise<JimpexReducerEventTarget<EventName>>);
    reduceSync: (<EventName>(event: JimpexReducerEventName, target: JimpexReducerEventTarget<EventName>, payload: JimpexReducerEventPayload<EventName>) => JimpexReducerEventTarget<EventName>);
}

The events service Jimpex uses. This is an alternative declaration of the EventsHub class that uses the interfaces and types from this project.

Type declaration