Rejects the "thenable", invoking any attached rejection handlers and applying the supplied arguments.
Abritrary, optional arguments to pass. These typically represent the erroneous state that caused the operation to fail.
Rejects the "thenable", invoking any attached rejection handlers and applying the supplied arguments.
Abritrary, optional arguments to pass. These typically represent the erroneous state that caused the operation to fail.
Successfully resolves the "thenable" with the given value.
The resolved value that the asynchronous operation produced.
Adds a callback to be invoked upon successful resolution or erroneous completion of the asynchronous operation.
doSomethingAsync()
.then(result => console.log("Success!"), error => console.log("Something went wrong."));
The callback to invoke if the "thenable" resolved successfully.
The callback to invoke if the "thenable" resolved erroneously.
The progress handler to invoke as the underlying asynchronous operation progresses. Note: Not all implementations support this operation.
Represents a
Promise
-like object. This interface is used for interoperability between different implementations ofPromise
.