Common signature for this library to specify objects that provide a then
method.
Methods
then<R>(onFulfilled:ThenableCallback<T, R>, ?onRejected:ThenableCallback<Any, R>):Thenable<R>
Calls the given callbacks when this promise is settled.
Note that unlike the JavaScript then
, the return type parameter
is only R
where as JavaScript then
has possible parameter types of
T
, R1
, and R2
.
Parameters:
onFulfilled | A callback that will be called with the value |
---|---|
onRejected | A callback that will be called with the reason |