EventField
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

EventField:

Type Safe Event Fields

Usage:

 
class MyThing {
 
  public FooEvent = new EventField<string>();
 
  constructor() {
    setInterval(_ => this.FooEvent.emit("foo"), 1000);
  }
}
 
let thing = new MyThing();
 
thing.FooEvent.on((payload) => {
  console.log(payload);
});
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    0
  • 1.0.2
    1

Package Sidebar

Install

npm i EventField

Weekly Downloads

1

Version

2.0.0

License

MIT

Last publish

Collaborators

  • icholy