Nicely Pointed Mandibles

    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);
    });
     

    Keywords

    none

    Install

    npm i EventField

    DownloadsWeekly Downloads

    2

    Version

    2.0.0

    License

    MIT

    Last publish

    Collaborators

    • icholy