Dex TypeScript SDK 1.30.0
    Preparing search index...

    Class AttributeMapInstance<T>

    Selects one AttributeMap instance for Client.getAttributes.

    Create a selection with AttributeMap.instance. The selection keeps the AttributeMap's value type, so getAttributes returns T | undefined for it. A selection is immutable and can be reused across calls.

    const notes = new AttributeMap("notes", jsonCodec<Note>());
    const firstNote: AttributeMapInstance<Note> = notes.instance("n1");
    const [note] = await client.getAttributes("order-42", firstNote);

    Type Parameters

    • T

      Value type of the selected AttributeMap.

    Index

    Constructors

    Properties

    Constructors

    • Creates a selection of one AttributeMap instance.

      Prefer AttributeMap.instance, which calls this constructor.

      Type Parameters

      • T

      Parameters

      • attributeMap: AttributeMap<T>

        AttributeMap definition. Client.getAttributes requires the exact definition registered by a Flow in the Client's Registry.

      • instance: string

        Non-empty logical map key. Slash is prohibited because it is a reserved character.

      Returns AttributeMapInstance<T>

      When instance is empty, contains only whitespace, or contains /.

    Properties

    attributeMap: AttributeMap<T>

    AttributeMap definition. Client.getAttributes requires the exact definition registered by a Flow in the Client's Registry.

    instance: string

    Non-empty logical map key. Slash is prohibited because it is a reserved character.