I wrote some code:
function renderGreeting(Elem: React.Component) {
return Hello, !;
}
In my case I was missing new inside the type definition.
some-js-component.d.ts file:
import * as React from "react";
export default class SomeJSXComponent extends React.Component {
new (props: any, context?: any)
}
and inside the tsx file where I was trying to import the untyped component:
import SomeJSXComponent from 'some-js-component'
const NewComp = ({ asdf }: NewProps) =>