Look This
function $WebComponent<
TagName extends string,
Clazz extends CustomElementConstructor
>(tag: TagName, Clz: Clazz) {
customElements.define(tag, Clz);
return Clz;
}
export const MyInput = $WebComponent(
"my-input",
class extends LitElement {
render() {
return html`<input type="text" />`;
}
}
);
html`<my-input></my-input>`; // It should jump to `MyInput` but fails
Look This