Interface Mutable

Mutable charge metadata instance.

Hierarchy

Accessors

Methods

  • Adds named attribute value to this metadata.

    Parameters

    • attribute: string

      Target attribute name.

    • value: unknown

      Value to add.

    Returns Mutable

    Modified metadata instance containing both attributes of this instance and the added ones.

  • Adds typed attribute value to this metadata.

    Type Parameters

    • TInput

      Attribute input type.

    Parameters

    • attribute: UcMetaAttr<unknown, TInput, unknown>

      Target attribute.

    • value: TInput

      Value to add.

    Returns Mutable

    Modified metadata instance containing both attributes of this instance and the added ones.

  • Obtains the value of the named attribute.

    If attribute has multiple values, then returns the last one.

    Parameters

    • attribute: string

      Target attribute name.

    Returns unknown

    Either attribute value, or undefined if there is no such attribute.

  • Extracts the typed value of the attribute.

    Type Parameters

    • T

      Attribute value type.

    Parameters

    • attribute: UcMetaAttr<T, unknown, unknown>

      Target attribute.

    Returns undefined | T

    Either attribute value, or undefined if attribute value can not be extracted.

  • Obtains all values of the named attribute.

    Parameters

    • attribute: string

      Target attribute name.

    Returns unknown[]

    Either array of attribute values, or empty array if there is no such attribute.

  • Extracts all typed values of the attribute.

    Type Parameters

    • T

      Attribute value type.

    Parameters

    • attribute: UcMetaAttr<T, unknown, unknown>

      Target attribute.

    Returns T[]

    Either array of attribute values, or empty array attribute values can not be extracted.

Generated using TypeDoc