Consider this:
const selectLiteral /*: JSX.Element */ = <select></select>;
const selectCode /*: React.ReactDetailedReactHTMLElement<{}, HTMLElement> */ = React.createElement('select', {});
The typing of createElement
is a bit incomplete due to non-specific HTMLElement
but that's on react's type definition file.
What I don't get is why do all XML literals get JSX.Element
instead of specific type? This seems like a deliberate choice? Also applies to custom components.