| | |
| | | "use strict"; |
| | | |
| | | /** |
| | | * Defines the group options type used by this module. |
| | | * @typedef {object} GroupOptions |
| | | * @property {boolean=} groupChildren |
| | | * @property {boolean=} force |
| | |
| | | */ |
| | | |
| | | /** |
| | | * Defines the group config type used by this module. |
| | | * @template I |
| | | * @template G |
| | | * @typedef {object} GroupConfig |
| | |
| | | */ |
| | | |
| | | /** |
| | | * Defines the group type used by this module. |
| | | * @template I |
| | | * @template G |
| | | * @typedef {{ config: GroupConfig<I, G>, name: string, alreadyGrouped: boolean, items: Items<I, G> | undefined }} Group |
| | | */ |
| | | |
| | | /** |
| | | * Defines the groups type used by this module. |
| | | * @template I, G |
| | | * @typedef {Set<Group<I, G>>} Groups |
| | | */ |
| | | |
| | | /** |
| | | * Defines the item with groups type used by this module. |
| | | * @template I |
| | | * @template G |
| | | * @typedef {object} ItemWithGroups |
| | |
| | | */ |
| | | |
| | | /** |
| | | * Defines the items type used by this module. |
| | | * @template T, G |
| | | * @typedef {Set<ItemWithGroups<T, G>>} Items |
| | | */ |
| | | |
| | | /** |
| | | * Returns grouped items. |
| | | * @template I |
| | | * @template G |
| | | * @template R |
| | |
| | | } |
| | | |
| | | /** |
| | | * Returns groups items. |
| | | * @param {Items<I, G>} itemsWithGroups input items with groups |
| | | * @returns {(I | G)[]} groups items |
| | | */ |