Optional
reasonThe reason that the promise was rejected with.
Optional
rejectedIdentifies if the promise was rejected (true) or was resolved (false/undefined)
A string indicating that the promise was rejected.
Optional
valueThe value that the promise was fulfilled with.
A Simple type which identifies the result of a promise as a single response, it identifies if the promise was rejected or resolved along with the resolved value or rejected reason. It is a union of the
IPromiseFulfilledResult
andIPromiseRejectedResult
interfaces the response will contain therejected
property which will be true if the promise was rejected or false if the promise was resolved. Thestatus
property will be set to either "fulfilled" or "rejected" to identify the status of the promise. Thevalue
orreason
properties will contain the resolved value or rejected reason respectively.Example