TemplateExpression has
interface TemplateExpression : Expression {
attribute Expression? tag;
attribute (Expression or TemplateElement)[] elements;
}
but that's imprecise: the elements must alternate, be nonempty, and begin and end with TemplateElement. A better type would be
interface TemplatePart {
attribute Expression expression;
attribute TemplateElement string;
}
interface TemplateExpression : Expression {
attribute Expression? tag;
attribute TemplateElement first;
attribute TemplatePart[] parts;
}
which represents precisely the legal templates.
TemplateExpression has
but that's imprecise: the
elementsmust alternate, be nonempty, and begin and end with TemplateElement. A better type would bewhich represents precisely the legal templates.