class sap/base/util/Deferred

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Extends:
Module: sap/base/util/Deferred
Application Component:

Creates a Deferred instance which represents a future value.

While a Promise can only be resolved or rejected by calling the respective methods in its constructor, a Deferred can be resolved or rejected via resolve or reject methods at any point. A Deferred object creates a Promise instance which functions as a proxy for the future result. This Promise object can be accessed via the promise property of the Deferred object.


Constructor

new module:sap/base/util/Deferred()

Methods Overview

Method Description
reject

Proxy call to the reject method of the wrapped Promise

resolve

Proxy call to the resolve method of the wrapped Promise

reject

Proxy call to the reject method of the wrapped Promise

Param Type DefaultValue Description
reason any

Failure reason

resolve

Proxy call to the resolve method of the wrapped Promise

Param Type DefaultValue Description
value any

Fulfillment value