RemotePromise
Example:
const promise = new RemotePromise(remoteSession, action);
// resolve the action value
promise.then(value => {
// `value` is the resolve remote action value
});
// resolve property of the action value
promise.find().then(value => {
// `value` === resolveOnRemote(action.fetch().find())
});
Constructor Summary
Public Constructor | ||
public |
constructor(session: RemoteSession, action: Action, opts: object): function Create a remote promise from a given action. |
Public Constructors
public constructor(session: RemoteSession, action: Action, opts: object): function source
Create a remote promise from a given action.
Params:
Name | Type | Attribute | Description |
session | RemoteSession | The remote session |
|
action | Action | The given action |
|
opts | object |
|
Session#request options |