title: Extending Promise to support Progress reporting
body: <p>So I wanted to extend Promise to have a 'progress' part so that i can report progrss with it while using Promise for my Async tasks.</p>
  
  <p>Thus I extended Promise like this:</p>
  
  <pre><code>class promisePro extends Promise {
      constructor(fn) {
          super(function (resolve, reject) {
              fn(resolve, reject, this._progress.bind(this));
          });
      }
  
      _progress(v) {
          if (this.progressCB)
              this.progressCB(v);
      }
  
      progress(fn) {
          this.progressCB = fn;
      }
  }
  </code></pre>
  
  <p>and used it:</p>
  
  <pre><code>function ptest() {
      return new promisePro((resolve, reject, progress) =&gt; {
          setTimeout(() =&gt; {
              progress(0.3)
          }, 1000)
          setTimeout(() =&gt; {
              progress(0.6)
          }, 2000)
          setTimeout(() =&gt; {
              progress(0.9)
          }, 3000)
          setTimeout(() =&gt; {
              resolve(1)
          }, 4000)
      })
  }
  </code></pre>
  
  <p>and used itt:</p>
  
  <pre><code>ptest().then((r) =&gt; {
      console.log('finiished: ' + r)
  }).progress((p) =&gt; {
      console.log('progress: ' + p)
  })
  </code></pre>
  
  <p>and got this error:</p>
  
  <pre><code>ptest().then((r) =&gt; {
      ^
  TypeError: Promise resolve or reject function is not callable
  </code></pre>
  
  <p>What am i doing wrong here?</p>
  
  <p>I was using node 7.5, updated to 8.4. Got that error in both versions.</p>
  
  <p>Thanks.</p>