Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/icholy/eventfield


https://github.com/icholy/eventfield

Last synced: 1 day ago
JSON representation

Awesome Lists containing this project

README

        

# EventField:

> Type Safe Event Fields

**Usage:**

``` ts

class MyThing {

public FooEvent = new EventField();

constructor() {
setInterval(_ => this.FooEvent.emit("foo"), 1000);
}
}

let thing = new MyThing();

thing.FooEvent.on((payload) => {
console.log(payload);
});

```