Properties

determinate :boolean source

Whether promise is in a determinate progress sate, meaning that it has provided a progress ratio with its most recent progress event.

error source

The error from the promise, if it was rejected.

fulfilled :boolean source

Whether promise is in a fulfilled state, with a value.

pending :boolean source

Whether promise is in a pending state, in progress.

progress source

The last known progress value emitted by the promise.

progressState :string source

One of "determinate", "indeterminate", "fulfilled", "rejected".

promise :Promise source

The promise whose state is interesting.

PromiseController source

A promise does not have bindable properties. This controller tracks the state of a promise with bindable properties so you can create a substitution that binds the viewed component with the state of the promise.

  • "pending" with "progress"
    when in the pending state, bind the substituted component to the
    progress value, which is null when indeterminate or a 0-1 value
    when determinate. Most promises are indeterminate due to the
    complexities of composing progress information into meaningful
    data.
  • "fulfilled" with "value"
    when in the fulfilled state, bind the substituted component to the
    value.
  • "rejected" with "error"
    when in the rejected state, bind the substituted component to the
    given error, if you can surface that error to the user.
  • "state" (one of "pending", "fulfilled", or "rejected")
    suitable for substitutions that will always render an indeterminate
    progress in the "pending" state.
  • "progressState" (one of "determinate", "indeterminate", "fuilfilled", "rejected")
    suitable for substitutions that provide alternative view for
    determinate and indeterminate progress.

rejected :boolean source

Whether promise is in a rejected state, with a error.

state :string source

One of "pending", "fulfilled", "rejected".

value source

The fulfillment value of the promise, if any.

Type Definitions

delegateWillMergeObjectWithLabel(label, newLabel) → {string|undefined} source

This delegate method is called when merging an object from serialization2 into serialization1. It allows the delegate to change how the object is going to be merged by saying that the object already exists in serialization1 under a different or the same label.

When the delegate method doesn't return a string then the default behavior is to add a new object to serialization1. If the object's label collides with another label in serialization1 then a new label is generated and used.

By returning a label that exists in serialization1 from the delegate method all references to the object being merged will change to point to the object from serialization1 instead and the object will not be merged.

Parameters:
Name Type Description
label string

The object label.

newLabel string

The new label generated by the collision resolver in case of collision.

Returns: string | undefined

the new label for this object.

Generated from a4679af

comments powered by Disqus

More help?

Can't find what you are looking for? Get in touch, we're more than happy in helping answer your questions.