diff --git a/src/govuk/common/index.mjs b/src/govuk/common/index.mjs index ed20a96116..49beea09e3 100644 --- a/src/govuk/common/index.mjs +++ b/src/govuk/common/index.mjs @@ -13,8 +13,9 @@ * This seems to fail in IE8, requires more investigation. * See: https://github.com/imagitama/nodelist-foreach-polyfill * - * @param {NodeListOf} nodes - NodeList from querySelectorAll() - * @param {nodeListIterator} callback - Callback function to run for each node + * @template {Node} ElementType + * @param {NodeListOf} nodes - NodeList from querySelectorAll() + * @param {nodeListIterator} callback - Callback function to run for each node * @returns {void} */ export function nodeListForEach (nodes, callback) { @@ -161,9 +162,10 @@ export function extractConfigByNamespace (configObject, namespace) { } /** + * @template {Node} ElementType * @callback nodeListIterator - * @param {Element} value - The current node being iterated on + * @param {ElementType} value - The current node being iterated on * @param {number} index - The current index in the iteration - * @param {NodeListOf} nodes - NodeList from querySelectorAll() + * @param {NodeListOf} nodes - NodeList from querySelectorAll() * @returns {void} */