TEmitter¶
Overview¶
Event & listener abstraction for a single "event" type. Unified interface for usage across the concrete implementations: - Emitter: PhET-iO instrumented Emitter - TinyEmitter: Lightweight version without phet-io for when performance/memory are critical
@author Sam Reid (PhET Interactive Simulations)
Type TEmitter¶
TReadOnlyEmitter<T> & { emit: ( ...args: T ) => void; dispose: () => void }
Type TEmitterListener¶
( ...args: T ) => void
Type TEmitterParameter¶
undefined and never are not allowed as parameters to Emitter
Exclude<IntentionalAny, undefined | never>
Source Code¶
See the source for TEmitter.ts in the axon repository.