Unable to wrap react-virtualized Table with TypeScript.
When I attempt to create a sortable table following this example, I receive the following TypeScript error: TS2345: Argument of type 'typeof Table' is not assignable to parameter of type 'WrappedComponent<TableProps<{}>>'. Type 'typeof Table' is not assignable to type 'WrappedComponentFactory<TableProps<{}>>'. Type 'typeof Table' provides no match for the signature '(props: TableProps<{}>): Element'.
example:
import { Table } from 'react-virtualized';
const SortableTable = SortableContainer(Table);
This also happens with Ant Design's Table component as well.
react: 16.6.3 react-virtualized: 9.21.0 @types/react-vritualized: 9.18.9 react-sortable-hoc: 0.8.3 @types/react-sortable-hoc: 0.6.4
I too was having the same error. For now casting the return instance type to any as below removes the build error.
const SortableTable = SortableContainer(Table) as any;
Any way to avoid using any here?