result.DependentResult Extends goog.result.Result
A DependentResult represents a Result whose eventual value depends on the value of one or more other Results. For example, the Result returned by

Inheritance

Constructor

goog.result.DependentResult()

Instance Methods

Public Protected Private
getParentResults() !Array.<!goog.result.Result>
No description.
Returns: !Array.<!goog.result.Result>  A list of Results which will affect the eventual value of this Result. The returned Results may themselves have parent results, which would be grandparents of this Result; grandparents (and any other ancestors) are not included in this list.
code »
cancel() boolean
Cancels the current Result, invoking the canceler function, if set.
Returns: boolean  Whether the Result was canceled.
code »
getError() *
No description.
Returns: *  The error slug for this Result. Will return undefined if the Result was a success, the error slug was not set, or if the Result is pending.
code »
getState() !goog.result.Result.State
No description.
Returns: !goog.result.Result.State  The state of this Result.
code »
getValue() *
No description.
Returns: *  The value of this Result. Will return undefined if the Result is pending or was an error.
code »
isCanceled() boolean
No description.
Returns: boolean  Whether this Result was canceled.
code »
wait(handleropt_scope)
Attaches handlers to be called when the value of this Result is available. Handlers are called in the order they were added by wait.
Arguments:
handler : !function(this:T, !goog.result.Result)
The function called when the value is available. The function is passed the Result object as the only argument.
opt_scope : T=
Optional scope for the handler.
code »
Defined in goog.Thenable
then(opt_onFulfilledopt_onRejectedopt_context) !goog.Promise.<RESULT>
Adds callbacks that will operate on the result of the Thenable, returning a new child Promise. If the Thenable is fulfilled, the onFulfilled callback will be invoked with the fulfillment value as argument, and the child Promise will be fulfilled with the return value of the callback. If the callback throws an exception, the child Promise will be rejected with the thrown value instead. If the Thenable is rejected, the onRejected callback will be invoked with the rejection reason as argument, and the child Promise will be rejected with the return value of the callback or thrown value.
Arguments:
opt_onFulfilled : ?(function(this:THIS, TYPE): (RESULT | IThenable.<RESULT> | Thenable))=
A function that will be invoked with the fulfillment value if the Promise is fullfilled.
opt_onRejected : ?(function(this:THIS, *): *)=
A function that will be invoked with the rejection reason if the Promise is rejected.
opt_context : THIS=
An optional context object that will be the execution context for the callbacks. By default, functions are executed with the default this.
Returns: !goog.Promise.<RESULT>  A new Promise that will receive the result of the fulfillment or rejection callback.
code »

Package result

Package Reference