invoke dynamically invokes the function, tok, which is offered by a provider plugin. invoke
behaves differently in the case that options contains {async:true} or not.
In the case where {async:true} is present in the options bag:
the result of invoke will be a Promise resolved to the result value of the provider plugin.
the props inputs can be a bag of computed values (including, Ts, Promise<T>s,
Output<T>s etc.).
In the case where {async:true} is not present in the options bag:
the result of invoke will be a Promise resolved to the result value of the provider call.
However, that Promise will also have the respective values of the Provider result exposed
directly on it as properties.
The inputs must be a bag of simple values, and the result is the result that the Provider
produced.
Simple values are:
undefined, null, string, number or boolean values.
arrays of simple values.
objects containing only simple values.
Importantly, simple values do not include:
Promises
Outputs
Assets or Archives
Resources.
All of these contain async values that would prevent `invoke from being able to operate
synchronously.
invoke
dynamically invokes the function,tok
, which is offered by a provider plugin.invoke
behaves differently in the case that options contains{async:true}
or not.In the case where
{async:true}
is present in the options bag:invoke
will be a Promise resolved to the result value of the provider plugin.props
inputs can be a bag of computed values (including,T
s,Promise<T>
s,Output<T>
s etc.).In the case where
{async:true}
is not present in the options bag:the result of
invoke
will be a Promise resolved to the result value of the provider call. However, that Promise will also have the respective values of the Provider result exposed directly on it as properties.The inputs must be a bag of simple values, and the result is the result that the Provider produced.
Simple values are:
undefined
,null
, string, number or boolean values.Importantly, simple values do not include:
Promise
sOutput
sAsset
s orArchive
sResource
s.All of these contain async values that would prevent `invoke from being able to operate synchronously.