Skip to content

AttributeFactory

AttributeFactory provides methods for creating Attribute and Qualifier values.

absoluteAttribute(id, …names): NamespacedAttribute

AbsoluteAttribute creates an attribute that refers to a top-level variable name.

number

…string[]

NamespacedAttribute


conditionalAttribute(id, expr, truthy, falsy): Attribute

conditionalAttribute creates an attribute with truthy and falsy branches selected by an expression.

number

Attribute

Attribute

Attribute


maybeAttribute(id, name): Attribute

MaybeAttribute creates an attribute that refers to either a field selection or a namespaced variable name.

number

string

Attribute


qualifier(options): Qualifier

Qualifier creates a qualifier on the target object with a given value.

QualifierOptions

Qualifier


relativeAttribute(id, operand): Attribute

relativeAttribute creates an attribute whose base value comes from a dynamic expression.

number

Attribute