import { ProFormItemProps } from "@ant-design/pro-form/es/interface" ; export default function useProFormItem < T > ( props ) { if ( props . required ) { props . rules = [ { required : true } ] ; } return { ... props } ; }