IPromise interface

Global

Represents the result of an asynchronous operation.

Methods

catch(onRejected) :IPromise

Async

Allows the holder of a IPromise to receive a callback when it is rejected.

Parameters

Name Type Description
onRejected IPromise~rejectedCallback

Called when this instance is rejected.

Returns

Type
IPromise

then(onFulfilled[, onRejected]) :IPromise

Async

Allows the holder of a IPromise to receive a callback when it is fulfilled or rejected.

Parameters

Name Type Description
onFulfilled IPromise~fulfilledCallback

Called when this instance is fulfilled.

onRejected IPromise~rejectedCallback Optional

Called when this instance is rejected.

Returns

Type
IPromise

Type Definitions

fulfilledCallback([value])

This callback is invoked when the IPromise is fulfilled.

Parameters

Name Type Description
value Any Optional

The resulting value.

rejectedCallback([reason])

This callback is invoked when the IPromise is rejected.

Parameters

Name Type Description
reason Any Optional

The reason as to why the IPromise was rejected.