index.tsx(16,12): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.


==== index.tsx (1 errors) ====
    namespace JSX {
        export interface Element {}
    }
    
    type Props<T> = PropsBase<string> | PropsWithConvert<T>;
    
    interface PropsBase<T> {
        data: T;
    }
    
    interface PropsWithConvert<T> extends PropsBase<T> {
        convert: (t: T) => string;
    }
    
    function ShouldInferFromData<T>(props: Props<T>): JSX.Element {
        return <div />;
               ~~~~~~~
!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists.
    }
    
    // Sanity check: function call equivalent versions work fine
    ShouldInferFromData({ data: "1" });
    ShouldInferFromData({ data: "1", convert: n => "" + n });
    ShouldInferFromData({ data: 2, convert: n => "" + n });
    
    
    const f1 = <ShouldInferFromData data={"1"} />;
    const f2 = <ShouldInferFromData data={"1"} convert={n => "" + n} />;
    const f3 = <ShouldInferFromData data={2} convert={n => "" + n} />;