Promise sub-class: super((resolve, reject) => this) ?

Domenic Denicola d at
Tue Jun 2 22:43:06 UTC 2015

Hmm I am pretty sure Babel et al. are correct here in not allowing this. The super call needs to *finish* before you can use `this`. Chrome also works this way.

The correct workaround is

let resolve, reject;
super((a, b) => {
  resolve = a;
  reject = b;

// use this

More information about the es-discuss mailing list