Mitt
Tiny 200 byte functional event emitter / pubsub
...Then with a module bundler like rollup or webpack, use as you would anything else. The UMD build is also available on unpkg. Set "strict": true in your tsconfig.json to get improved type inference for mitt instance methods. Alternatively, you can use the provided Emitter type. Remove an event handler for the given type. If handler is omitted, all handlers of the given type are removed. Invoke all handlers for the given type. If present, '*' handlers are invoked after type-matched handlers.