import { type WebComponentInterface } from './WebComponentInterface'; import WebComponentType from './WebComponentType'; const constructorFactory = >(component: WebComponentType, styles: string): ((this: T) => void) => { return function (this: T): void { /* Find template in main DOM. */ const template = document.getElementById(`${component.tagName}-template`) as HTMLTemplateElement; if (template) { /* Clone the template content. */ const clone = template.content.cloneNode(true) as DocumentFragment; /* Creates a