Question · JavaScript and TypeScript course · Module 10: TypeScript in Practice
Generic EventEmitter
What advantage does a generic TypedEventEmitter<T> provide compared to an untyped emitter?
Answer options
- The compiler enforces correctness of data emitted and listened to for each event
- Increases event emission performance by 50%
- Automatically logs all events to the console
- Allows emitting events only in development mode
You can check the correct answer by solving this task in the CodeWorlds game.