Is there a String Union Type of all HTML Element names?

Pretty much what the title says. I want to be able to pass in any name of an html element, to then apply a style to, and return to the user.
5 Replies
Kyle
KyleOP2y ago
so the type would be a string union of something like this:
type Element = "a" | "div" | "p" // and so on and so forth
type Element = "a" | "div" | "p" // and so on and so forth
Kyle
KyleOP2y ago
I'm wanting to implement something like this:
Kyle
KyleOP2y ago
Answer: HTMLElementTagNameMap
Kyle
KyleOP2y ago
Kyle
KyleOP2y ago
Lmao Astro has an htmlTag type
Want results from more Discord servers?
Add your server