I am attempting to extend the Promise object with the following code:
class MyPromise extends Promise {
constructor(executor) {
super((resolve, reject) => {
return executor(resolve, reject);
});
}
}
However, I am getting the following error:

What does this error mean? How can I successfully extend Promise?