flush() {
    // call each callback for each item in the queue
    this.queue.forEach(args => this.callbacks.forEach(callback => callback(...args))); // pass the entire queue to all bulk callbacks

    this.bulkCallbacks.forEach(callback => {
      callback(this.queue);
    }); // clear out the queue

    this.queue = [];
  }
/** Call all of our callbacks and clear out the queue */
Call all of our callbacks and clear out the queue
Call all of our callbacks and clear out the queue
flush() {
    this.queue.forEach(args => this.callbacks.forEach(callback => callback(...args))); 
    this.bulkCallbacks.forEach(callback => {
      callback(this.queue);
    }); 
    this.queue = [];
  }
flush ( ) { this . queue . forEach ( args => this . callbacks . forEach ( callback => callback ( ... args ) ) ) ; this . bulkCallbacks . forEach ( callback => { callback ( this . queue ) ; } ) ; this . queue = [ ] ; }
Call all of our callbacks and clear out the queue
Call all of our callbacks and clear out the queue
// call each callback for each item in the queue // pass the entire queue to all bulk callbacks // clear out the queue