Event emitters are a common pattern in the Node.js world, but for TypeScript developers, they can carry some woe. TypeScript allows us to type “stringly-typed” APIs like event emitters and the web’s EventTarget interface (addEventListener and friends), but without more advanced type operators we’re stuck manually specifying every event name for every API that handles them. This works fine when som