Zum Inhalt springen
Deutsch

EventClass

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

EventClass<TEvent> = (…args) => TEvent

Defined in: src/EventKey.ts:24

A class used as a channel. Its instances are the events.

abstract is deliberate: matching is by instanceof, so an abstract base is a perfectly good channel — and the most useful one, since subscribing to it takes a whole family of events (every ActorLifecycleEvent, say) with a single call. It stays a type rather than the interface a construct signature would normally ask for, because an interface cannot declare an abstract one, and dropping abstract to satisfy the rule would drop the families with it.

TEvent = unknown

any[]

TEvent