Estoy intentando editar los estilos de todos los elementos principales de un elemento dentro de mi shadowroot usando una llamada de función, pero sigo obteniendo Property 'style' does not exist on type 'Element' . Aquí está mi código:
var child = this.shadowRoot!.host; var parents = []; while(child) { child = child.parentElement as HTMLElement; parents.unshift(child); } parents.forEach(element => { element.style.height='100vh'; element.style.width='100vw'; }) Intenté definir la matriz principal como HTMLElements específicamente, pero sigo recibiendo el error La Conversion of type 'never[]' to type 'HTMLElement' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
¿Cómo puedo definir la matriz principal como una matriz vacía de HTMLElements específicamente, o acceder a la propiedad 'estilo' de mis elementos de otra manera?