Question · JavaScript and TypeScript course · Module 10: TypeScript in Practice

EventMap in TypeScript

What is an EventMap in the context of a type-safe event system?

Answer options

  • A base class for all event emitters
  • An interface mapping event names to their data types (payload)
  • A built-in TypeScript type for handling DOM events
  • A decorator applied to event handler methods

You can check the correct answer by solving this task in the CodeWorlds game.