pCon.basket - Plugin Development
    Preparing search index...

    Interface ItemDescriptionProvider

    interface ItemDescriptionProvider {
        eventItemDescriptionChanged: ListenableEvent<
            BasketItem,
            ItemDescriptionProvider,
        >;
        dispose(): Promise<void>;
        fetchItemDescriptions(pItems: readonly BasketItem[]): Promise<void>;
        getItemDescription(
            pItem: BasketItem,
        ): ItemDescriptionLine | null | undefined;
    }

    Hierarchy (View Summary)

    Index
    eventItemDescriptionChanged: ListenableEvent<
        BasketItem,
        ItemDescriptionProvider,
    >

    Will be triggered everytime the description of an item has changed (after it was fetched initially).

    • Called if this instance is no longer in use. Should be used to clean-up resources.

      Returns Promise<void>

    • Fetches the descriptions for the given items. Afterwards getItemDescription() no longer returns undefined for these items (except if the descriptions have changed).

      Parameters

      • pItems: readonly BasketItem[]

      Returns Promise<void>

    • Returns the currently known description for the given item. If the description is unknown (not fetched yet) undefined will be returned. If the item does not have a description null will be returned.

      Parameters

      • pItem: BasketItem

      Returns ItemDescriptionLine | null | undefined