Open jeremy-coleman opened 5 years ago
I don't think so, but it sounds like you want an easier way to apply global augmentations for registration patterns which are necessary for custom elements, which is a reasonable request.
Ah, was hoping it could be implemented easily by treating the customElement registry similar to a global var, but yes you summed it up perfectly. There is really a need beyond just custom elements , but i think that is the best target to aim for currently. On a related note, the stencil compiler generates types and writes them to disk on the fly , which may be a useful resource if you decide to pursue this
Suggestion
It seems likely the compiler logic used for globalThis could be reused to support automated global types for custom elements , which is especially annoying and difficult to deal with in jsx
Use Cases
this is the current dev workflow for creating and using custom elements
The custom element loading-spinner.ts
the type definition loading-spinner.d.ts
Using the custom component usage in a jsx component