From 784ad332a312879d39b16072c7388872d04c096e Mon Sep 17 00:00:00 2001 From: Guz013 Date: Thu, 30 Nov 2023 15:13:30 -0300 Subject: [PATCH] =?UTF-8?q?fix(types):=20=F0=9F=90=9B=20change=20HTMLEleme?= =?UTF-8?q?nt=20to=20Element=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/banners/src/index.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/banners/src/index.js b/packages/banners/src/index.js index 4099fb9..cb0d69a 100644 --- a/packages/banners/src/index.js +++ b/packages/banners/src/index.js @@ -6,18 +6,18 @@ import getLocalLayout from './layouts.js'; /** * @param {Readonly} string - The string to be converted. * @param {Document} document - The document API to be used. - * @returns {HTMLElement} - The DOM of the string. + * @returns {Element} - The DOM of the string. */ function stringToHtml(string, document) { const tmp = document.createElement('template'); tmp.innerHTML = string; - /** @type {HTMLElement} */ + /** @type {Element} */ const dom = tmp.children[0]; return dom; } /** - * @param {HTMLElement} element - The element to be converted to string. + * @param {Element} element - The element to be converted to string. * @param {Document} document - The document API to be used. * @returns {string} - The resulting string. */ @@ -28,9 +28,9 @@ function htmlToString(element, document) { } /** * @typedef {{ - * modify(query: string, callback: (el: Element | null) => T) => T + * modify(query: string, callback: (el: Element | null) => T): T * }} DOMHelper - * @param {HTMLElement} element - The element to be manipulated. + * @param {Element} element - The element to be manipulated. * @returns {DOMHelper} */ function domHelper(element) {