Interface TokenLabelAndValue

Result from IMessageTokenSource.getValuesForTokens

interface TokenLabelAndValue {
    tokenLabel: string;
    associatedValue: any;
    purpose?: "message" | "label" | "value" | "parameter";
}

Properties

tokenLabel: string

The text within the {} of the token. Used to match tokens.

associatedValue: any

The value to be used as a replacement. It will be run through a formatter based on either the specified formatterKey or the data type of this value, by using DataTypeIdentifierService. IDataTypeFormatter classes.

purpose?: "message" | "label" | "value" | "parameter"

Provides additional guidance about the token's purpose so the IMessageTokenResolver can apply additional formatting to the token, such as in HTML, a span tag with a specific classname. When null, no additional guidance is offered. Values are: 'label' - the target of the message, such as the ValueHost's label. {Label} is an example 'parameter' - configuration data, such as a ConditionConfig's rules. {Minimum} is an example 'value' - some live data, such as the ValueHost's current value. {Value} is an example 'message' - text just augments the error message, like {ConversionError} of DataTypeCheckCondition

Generated using TypeDoc v0.25.12