We missed this because Flow wasn't being run properly on Travis but now that it is, it's clear that #7716 introduced a bunch of new Flow failures. Most of these shouldn't be too bad and I like to say "you break it you buy it" so this one is for you @Aweary :)

There were a couple other pre-existing Flow issues that @vjeux is going to fix, so mostly this should just be the TestRenderer issues.

const listeners = this.listeners || (this.listeners = {});
    listeners[type] = listener;
    if (listener) {
      if (!subscriptions[type]) {
        subscriptions[type] = this.node.subscribe(type, listener, this);
      }
    } else {
      if (subscriptions[type]) {
        subscriptions[type]();
        delete subscriptions[type];
      }
    }
  },
  handleEvent: function(event) {
    const listener = this.listeners[event.type];
    if (!listener) {
      return;
    }
    if (typeof listener === 'function') {
      listener.call(this, event);
    } else if (listener.handleEvent) {
      listener.handleEvent(event);
    }
  },
  destroyEventListeners: function() {
    const subscriptions = this.subscriptions;
    if (subscriptions) {
      for (let type in subscriptions) {
        subscriptions[type]();
      }