Type Definitions
Deferred
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
promise |
Promise | the wrapped promise |
||
resolve |
function | resolves the wrapped promise with given value |
||
reject |
function | rejects the wrapped promise with given error |
||
then |
function | defines a success handler for the wrapped promise and returns its result |
||
catch |
function | defines an error handler for the wrapped promise and returns its result |
||
finally |
function | defines a "settled" handler for the wrapped promise and returns its result |
||
status |
String | holds the current resolution status, can either be "pending", "fulfilled" or "rejected" |
||
isSettled |
function | returns true, if the Deferred is either "fulfilled" or "rejected" |
||
provision |
* |
<optional> <nullable> |
null | may contain (a) provisional value(s) to use for a newly instantiated Deferred, before it has resolved to the actual value(s) |
Observable
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
getValue |
function | returns the current value |
setValue |
function | sets a new value, which will subsequently trigger all subscriptions |
subscribe |
function | register a given function to be executed on any value change, the subscription receives the new and the old value on each execution, returns the subscription value, which can later be used to unsubscribe again |
unsubscribe |
function | removes a given subscription again, use subscription value returned by subscribe here |