Attribute definition.

This is passed to @Attribute and @AttributeChanged decorators.

Type Parameters

  • T extends object

    A type of component.

Hierarchy

  • AttributeDef

Properties

Properties

name?: string

Attribute name, either camelCase or dash-style.

This is required if annotated property's key is not a string (i.e. a symbol). Otherwise, the attribute name is equal to the property name converted to dash-style by default.

updateState?: boolean | StatePath | AttributeUpdateReceiver<T>

Whether to update the component state after attribute change.

Can be one of:

  • false to not update the component state,
  • true (the default value) to update the component state with changed attribute key,
  • a state value key to update, or
  • an attribute update receiver function with custom state update logic.

Generated using TypeDoc