Typed expansion
It is possible to type ("convert from string to specific type") the result of an expansion.
This is done by adding a type directive to the expansion expression:
The following types are currently supported
string (default)
number
int
long
float
double
boolean (alias: bool)
json
The primary use of typed expansion is when adding the result of an expansion (always a string) to a scope (session for example) where it is to be consumed by a component that requires a specific type. If the consumer is type agnostic, typed expansion is not necessary. In this case the consumer will handle the typing.
If an invalid type directive is specified, type will default to string (just like regular expansion).
Examples
Last updated