A modern Deferred Promise implementation that exposes resolve/reject methods. Provides external control over Promise resolution while maintaining Promise semantics.
Readonly
Indicates whether the promise has been settled (resolved or rejected)
Gets the rejection reason if the promise was rejected
Gets the resolved value if the promise was resolved
Attaches a callback for only the rejection of the Promise
Optional
A new Defer instance
Attaches a callback that is invoked when the Promise is settled
Attaches callbacks for the resolution and/or rejection of the Promise
Static
Creates a pre-rejected Defer instance
The rejection reason
A rejected Defer instance
Creates a pre-resolved Defer instance
The value to resolve with
A resolved Defer instance
A modern Deferred Promise implementation that exposes resolve/reject methods. Provides external control over Promise resolution while maintaining Promise semantics.