Create a new deferrable promise which supports resolving it outside of the context of the promise.
Optional promise: Promise<T>Optionally a promise to wrap.
Private #innerPrivate #isPrivate #rejectPrivate #resolveBind the current promise to another promise, resolving or rejecting the current promise when the other promise is resolved or rejected.
The other promise to bind to.
The current promise.
Optional onfulfilled: ((value) => TResult1 | PromiseLike<TResult1>)Optional onrejected: ((reason) => TResult2 | PromiseLike<TResult2>)
Deferred promise implementation.