src/common/emitter.ts/Emitter/event
class Emitter:  public get event(): Event<T> {
    return (cb: Callback<T>): Disposable => {
      this.listeners.push(cb)

      return {
        dispose: (): void => {
          const i = this.listeners.indexOf(cb)
          if (i !== -1) {
            this.listeners.splice(i, 1)
          }
        },
      }
    }
  }