Skip to content

Instantly share code, notes, and snippets.

@gsathya
Created February 8, 2018 00:33
Show Gist options
  • Save gsathya/e2409ee0b381bc8e72bc82114fd846c5 to your computer and use it in GitHub Desktop.
Save gsathya/e2409ee0b381bc8e72bc82114fd846c5 to your computer and use it in GitHub Desktop.
class X extends Promise {
static get [Symbol.species]() {
return Y;
}
}
class Y {
constructor(executor) {
return new Proxy(new Promise(executor), {});
}
}
var x = X.resolve().then(() => {});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment