Interface Extension<T, R>

An extension sub element on a parent TLV element. T is the parent TLV element type. R is the value type of this extension.

Type Parameters

  • T

  • R = unknown

Hierarchy

  • Extension

Properties

Properties

decode: ((obj, tlv, accumulator?) => R)

Type declaration

    • (obj, tlv, accumulator?): R
    • Decode extension element.

      Parameters

      • obj: T

        parent object.

      • tlv: Tlv

        TLV of sub element; its TLV-TYPE would be this.tt .

      • Optional accumulator: R

        previous decoded value, if extension element appears more than once.

      Returns R

encode: ((obj, value) => Encodable)

Type declaration

    • (obj, value): Encodable
    • Encode extension element.

      Parameters

      • obj: T

        parent object.

      • value: R

        decoded value.

      Returns Encodable

      encoding of sub element; its TLV-TYPE should be this.tt .

order?: number

Order relative to other extensions, used on encoding only.

tt: number

TLV-TYPE.

Generated using TypeDoc