ComPDFKit Web SDK
    Preparing search index...

    Interface ItemListAPI<T>

    Common shape of the item list objects (the same add / update / getItems).

    interface ItemListAPI<T> {
        add(
            items: T | T[],
            dataElementToInsertAfter?: string,
        ): ItemListAPI<T> | undefined;
        getItems(): T[];
        update(items?: T[]): ItemListAPI<T>;
    }

    Type Parameters

    • T
    Index
    • Inserts after the item whose dataElement is after (at the start when omitted or not found). Returns undefined for an empty argument, otherwise this.

      Parameters

      • items: T | T[]
      • OptionaldataElementToInsertAfter: string

      Returns ItemListAPI<T> | undefined

    • The current items (shallow copy of the array).

      Returns T[]

    • Replaces all items (no argument clears them). Returns this.

      Parameters

      • Optionalitems: T[]

      Returns ItemListAPI<T>