(items)
| 2719 | * @returns {NamedObject<T>} an object |
| 2720 | */ |
| 2721 | const mergeToObject = (items) => { |
| 2722 | const obj = Object.create(null); |
| 2723 | for (const item of items) { |
| 2724 | obj[item.name] = item; |
| 2725 | } |
| 2726 | return obj; |
| 2727 | }; |
| 2728 | |
| 2729 | /** |
| 2730 | * @template {{ name: string }} T |