https://github.com/icholy/eventfield
https://github.com/icholy/eventfield
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/icholy/eventfield
- Owner: icholy
- Created: 2016-04-08T18:25:32.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-07T14:12:26.000Z (almost 8 years ago)
- Last Synced: 2025-03-04T18:48:13.307Z (4 months ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);
});```