Creating a Simple, Type-Safe EventEmitter in TypeScript
Our objective is to create an EventEmitter that allows us to subscribe to events, publish events, and manage our subscribers in a type-safe manner.
I'm Jonathan, a software developer based in Stockholm Sweden. I currently work on making the world a better place™️ over at Auki Labs. In my freetime I hacking on side projects to satisfy my need to solve problems for people.
Our objective is to create an EventEmitter that allows us to subscribe to events, publish events, and manage our subscribers in a type-safe manner.
On a recent project I have been working on, I had to find a way to host a gatsbyjs project in a [docker](https://www.docker.com/) container.
So I have for a long time used third-party software to rebind my keyboard so that I could use the US keyboard layout when I program and still use åäö which is used quite a lot in swedish. and I didn't want to switch keyboard layout just to type those letters.
Refactorability and maintainability are closely related but separate concepts in my mind. maintainable code is something that can you write and make an effort to keep maintainable, and of course all of us should strive to write maintainable code, but what is refactorable code ?