Function: applyAction()
function applyAction<TRet>(subtreeRoot, call): TRet;
Applies (runs) an action over a target object.
It runs any kind of action (built-in, standalone, model actions and flows), but not views.
To apply calls that come from outside (e.g. as JSON), decode them with a serializer
(defaultSerializer.decodeCall) and use applyCall / applyCallAsync instead, which check
what may be called.
Type Parameters
| Type Parameter | Default type |
|---|---|
TRet | any |
Parameters
| Parameter | Type | Description |
|---|---|---|
subtreeRoot | object | Subtree root target object to run the action over. |
call | ActionCall | The action, usually as coming from onActionMiddleware. |
Returns
TRet
The return value of the action, if any.