update JSDocs

This commit is contained in:
Niels Lyngsø
2024-11-06 13:24:18 +01:00
parent 39768664d9
commit ff69e28fdb

View File

@@ -5,6 +5,7 @@
* @param {T} entry - The object to insert or replace with.
* @param {getUniqueMethod: (entry: T) => unknown} [getUniqueMethod] - Method to get the unique value of an entry.
* @description - Append or replaces an item of an Array.
* @returns {T[]} - Returns a new array with the updated entry.
* @example <caption>Example append new entry for a Array. Where the key is unique and the item will be updated if matched with existing.</caption>
* const entry = {key: 'myKey', value: 'myValue'};
* const newDataSet = pushToUniqueArray([], entry, x => x.key === key, 1);