Terminal TAST

Inline Types

TAST Inline types allows to create a set of preconfigured, styles, actions, and other properties that affects to all inlines of that type.

Good developers are lazy and do not want to repeat the same thing more than twice. When it happens they love to create abstractions and generics to cover repeated cases. The problem is that TAST must work with JSON and should be serializable, which does not allows to use complex structures of reutilizable code. In order to solve this restriction, TAST Inlines can be typed. Inline types have those definitions and are applied to all the inlines of the same inlineType.

Default Inline types

There are three default Inline types: actionLink, infoLink and stripedTable. Configure the property inlineType to use any of them.

Custom Inline types styles

Use setTerminalsInlineTypes to define your own inline types. Then, use them from the TAST as many times as you want.

Note that if the Inline type does not exists, nothing happens.

Extending styles

Inlines can extend the style of its Inline type. They just must have a style property in addition to the inlineType property.

Themes

Inline types can define theme. They can mark that all inlines of that type apply one theme.

Custom actions

Inline types can also define actions to be executed. All Inlines with that type will fire the same action when clicked o pressed intro. Of course terminalId and inlineId are added.

Extending actions

Inlines extends actions with the action property.

Configuring Inline types

Inline types should configured by the plugin in the beginning of the plugin. This is required to do once, and the defined Inline types will be actived for all terminal outputs.