Checks if the Deferred object has been finalized (either resolved or rejected).
Checks if the Deferred object is still pending.
Checks if the Deferred object has been rejected.
Checks if the Deferred object has been resolved.
The current state of the Deferred object.
Rejects the Deferred object with an optional reason. If the Deferred object has already been resolved or rejected, this method does nothing.
Optional
reason: unknownThe reason for rejection (optional).
Resolves the Deferred object with a value. If the Deferred object has already been resolved or rejected, this method does nothing.
The value to resolve the Deferred object with.
A Deferred object represents a value that may not be available yet but will be resolved or rejected in the future.