У меня есть форма, созданная Form.create (), но я не могу выполнить компилятор успешно.
ошибка типа:
Argument of type 'FunctionComponent<MyProps>' is not assignable to parameter of type 'ComponentType<{}>'.
Type 'FunctionComponent<MyProps>' is not assignable to type 'FunctionComponent<{}>'.
Type '{}' is missing the following properties from type 'MyProps': form, and 2 more
Мой код:
import { FormComponentProps } from "antd/lib/form";
interface MyProps extends FormComponentProps {
form: any;
}
const TableQuery: FunctionComponent<MyProps> = (props: MyProps) => {
// some code
};
const WrappedTableQuery = Form.create<MyProps>()(TableQuery)
export default WrappedTableQuery;
Как я могу исправить эту ошибку.