Uncaught DOMException: Failed to execute \'define\' on \'CustomElementRegistry\': this name has already been used with this registry at http://127.0.0.1:8000/components/
Well, this worked for me, with no Typescript warnings,
if (!customElements.get('the-element')) { customElements.define('the-element', HTMLTheElement); }
Hope someone will find this useful.
Cheers.