Function: applyCall()
function applyCall<TRet>(
root,
call,
options?
): TRet;
Runs a call (as returned by Serializer.decodeCall, or built in process) on a tree and returns
its result as is. Flows are refused (call.isFlow); use applyCallAsync for them.
The call's name is resolved on its target (see CallKind), then canCall decides whether it
may run (by default only model actions may). Errors about the call are CallErrors; errors
thrown by the action or view are rethrown as they are.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
TRet | unknown | Return type. |
Parameters
| Parameter | Type | Description |
|---|---|---|
root | object | Root of the tree. |
call | | Call | ResolvedCall | The call. |
options? | ApplyCallOptions | Options. |
Returns
TRet
The result of the call.