I was looking around in the documentation and saw the page on events but it didn’t say anything about how to emit non-predefined events. From the source it looks like all the events are just dynamic functions, but I was hoping for something that uses a subscribe/publish/unsubscribe pattern.
What’s the best way to do this?