Digamos que tengo una HTMLCollection:
const appElem = document.querySelector("#app"); const appChildren = appElem?.children; // HTML collection ahora, si convierto esta colección en una matriz, será Element[] :
const appChildrenArr = appChildren && Array.from(appChildren); // Element[] Pero, ¿por qué appChildrenArr tiene el tipo Element[] , no el tipo HTMLElement[] ?
Porque no tienen que ser HTMLElements. También podría tener un SVGElement allí, por ejemplo.