Create a Custom Type
Custom types can be used to define the structure of any variable. Create a custom type when you want a type that defines an array or an object, and you want to individually add the attributes that define the type’s data structure. You can also create a custom type to define a list of enumeration values.
Create a Custom Object or Array
You create a custom object when you want a type to define an object that contains properties and a custom array when you want a type to store multiple variables of the same type.
You can view the type's usage information under Usages in the Properties pane (for example, which variables are based on it). Click a usage to readily navigate there.
Create a Custom Enumeration
You create an enumerated type when you want to list—or enumerate—permitted values. Enumerations are useful for variables that have a small set of possible values and are usually used to declare different options (say, a list of cities) or actions (like up, down, left, and right).
For example, to specify a list of cities in California, ordered by population, your enumerators could be Los Angeles, San Diego, San Jose, and San Francisco, belonging to an enumerated type named cityType. If a variable cityVar is declared with cityType as its data type, a user can assign any of those four values to the variable.
Defining an enumeration as a type lets you refer to the enumeration values as well as reuse the type in multiple places.
To create an enumerated type:
{
...
"variables": {
"cityVar": {
"type": "cityType",
"defaultValue": "{{ $enums.cityType.SanFrancisco }}"
}
The actual value is determined at runtime when the expression is evaluated.