I have a generic React component, say like this one:
class Foo extends React.Component, FooState> {
constructor(props: F
EDIT: After some changes to your code, it was only a wrong constraint T in your withTd function.
// I needed to change the constraint on T, but you may adapt with your own needs
export const withTd = >(
TableElement: React.ComponentType
): React.SFC => (props: T) => (
)
// Explicitly typed constructor
// Removed after EDIT
//const FooW = Foo as new (props: FooProps) => Foo
// Inferred as React.StatelessComponent>
const FooWithTd = withTd(Foo)
No longer relevant after EDIT :
You may find more information at this issue https://github.com/Microsoft/TypeScript/issues/3960