Skip to content

anothertodo API


anothertodo API / DomainEventBus

Class: DomainEventBus

Post-commit notifications only; subscriber failures never roll back storage.

Constructors

Constructor

new DomainEventBus(onSubscriberError?): DomainEventBus

Parameters

onSubscriberError?

(error) => void

Returns

DomainEventBus

Methods

emit()

emit<K>(event, payload): void

Type Parameters

K

K extends keyof DomainEvents

Parameters

event

K

payload

DomainEvents[K]

Returns

void


on()

on<K>(event, listener): () => void

Type Parameters

K

K extends keyof DomainEvents

Parameters

event

K

listener

Listener<DomainEvents[K]>

Returns

() => void

最后更新:

anothertodo — 轻量命令行 TODO 工具