EventObserver<TEvent extends IEvent> typedef
A function type that observes events and optionally transforms or filters them.
Returns Some(event) to allow the event to proceed, or None() to cancel it.
Implementation
typedef EventObserver<TEvent extends IEvent> = Option<TEvent> Function(TEvent event);