@vcmap/core
    Preparing search index...

    Class CategoryCollection

    Hierarchy (View Summary)

    Index

    Accessors

    • get previousIndexSymbol(): symbol

      Get the symbol which is attached to an item prior to its removal. If an item is removed, the current index of the item is set on the item with this symbol.

      Returns symbol

    • get uniqueKey(): keyof T | undefined

      The key by which to check uniqueness against. undefined if no uniqueness constraint is set.

      Returns keyof T | undefined

    Constructors

    Methods

    • Returns an item identified by the unique constraint key. Returns null, if there is no uniqueness constraint.

      Parameters

      • value: unknown

        the value to test against. does a shallow comparison, if the passed a non-atomic value

      Returns Category<object | VcsObject, object> | undefined

    • Returns true, if the key exists. Returns undefined, if there is no uniqueness constraint.

      Parameters

      • value: unknown

      Returns boolean | undefined

    • Parses the category items. Items will only be parsed, if a category with said name exists. Otherwise, they will be cached, until such a category is requested.

      Parameters

      • name: string
      • items: object[]
      • moduleId: string

      Returns Promise<void>

    Properties

    _array: Category<object | VcsObject, object>[]
    added: VcsEvent<Category<object | VcsObject, object>>

    Event raised if an item is added. Is passed the added item.

    moved: VcsEvent<Category<object | VcsObject, object>>

    Event raised if an item is relocated within the collection. Is passed the moved item.

    removed: VcsEvent<Category<object | VcsObject, object>>

    Event raised if an item is removed. Is passed the removed item.