Accepts a Promise/A+ constructor and uses it to create a derived promise based on that implementation, with all the additional members.
Use this function to wrap an existing Promise implementation without modifying it.
Note that promise implementations that define methods beyond the Promise/A+ interface may return instances of the base promise, instead of the derived one.
Parameters
constructor: PromiseConstructorLike
The promise constructor used to create the derived promise.
Accepts an existing Promise/A+ constructor and extends the constructor itself and its prototype with all the available methods.
Calling this method on a Promise mutates it.
Accepts a Promise/A+ constructor and uses it to create a derived promise based on that implementation, with all the additional members. Use this function to wrap an existing Promise implementation without modifying it. Note that promise implementations that define methods beyond the Promise/A+ interface may return instances of the base promise, instead of the derived one.