Class: Result

Result

new Result()

A Result represents a promise for the result of an async operation. It implements the standardised Promise/A+ spec.

Methods

then(onFulfilled, onRejected) → {Result.<T>}

Chain a Result.
Parameters:
Name Type Description
onFulfilled Result.Fulfilled.<T> The fulfilled callback
onRejected Result.Rejected The rejected callback
Returns:
A new promise
Type
Result.<T>

Type Definitions

Fulfilled(value)

The callback that is invoked when a promise is fulfilled.
Parameters:
Name Type Description
value T the promise value

Rejected(reason)

The callback that is invoked when a promise is rejected.
Parameters:
Name Type Description
reason Error the promise rejected reason