Event for listeners to subscribe to. Subscribes a function to run when this event is emitted.
Use like const unsubscriber = event(callback)
Unsubscriber function to run to stop calling the passed-in function when the event is emitted
Protected
assertCheck to make sure this emitter is not disposed. Throw if it is
Disposes of this event, preparing it to release from memory
Protected
disposeDisposes of this event, preparing it to release from memory. Added here so children can override emit and still call the base functionality.
Runs the subscriptions for the event
Event data to provide to subscribed callbacks
Protected
emitFunction that runs the subscriptions for the event. Added here so children can override emit and still call the base functionality. See NetworkEventEmitter.emit for example
Event manager - accepts subscriptions to an event and runs the subscription callbacks when the event is emitted Use eventEmitter.event(callback) to subscribe to the event. Use eventEmitter.emit(event) to run the subscriptions. Generally, this EventEmitter should be private, and its event should be public. That way, the emitter is not publicized, but anyone can subscribe to the event.