What you want to do when your occasions lengthen every different
The evident resolution used to be to make use of interface inheritance with a union kind. I searched for methods to do that the use of loyal assets —The TypeScript Handbook, Stack Overflow, and Medium — however, I couldn’t discover a description of how one can make it paintings. I had to transfer ahead with this means for the reason that handiest different obvious resolution sucked: duplicating match houses 🤢.
So, I made a toy instance of the issue, talked it via with my teammates at, and between us got here up with an answer 😎.
This is the object that I’d was hoping to seek out.