next

open override fun <E : Event> next(eventClass: KClass<E>, action: (E) -> Unit)

Subscribes the action to be executed when the next event of type E is emitted. The action will then be automatically unsubscribed.