What would the return type be here?
const Foo
: () => // ???
= () => (
Foobar
)
See https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts
Each JSX element is just syntactic sugar for calling React.createElement(component, props, ...children).
function createElement, T extends Element>(
type: string,
props?: ClassAttributes & P,
...children: ReactNode[]): DOMElement;
So it's DOMElement