Classes
Methods
addItem(item)
Adds an item to the store with a type check.
Parameters:
| Name | Type | Description |
|---|---|---|
item |
ShopItem | An element that inherits from ShopItem. |
- Source:
Throws:
-
If the element does not inherit from ShopItem.
- Type
- Error
getTotalItemsCount() → {number}
Returns the total number of elements in the store.
- Source:
Returns:
The count of items.
- Type
- number