An open API service indexing awesome lists of open source software.

https://github.com/icholy/eventemitter


https://github.com/icholy/eventemitter

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# EventEmitter:

> Partially Type Safe Event Emitter

**Usage:**

``` ts

enum Events { A, B, C }

class Foo extends EventEmitter {}

var foo = new Foo();

foo.addListener(Events.A, (payload: string) => {
console.log(payload);
});

foo.emitEvent(Events.A, "Hello World!");
```