index.d.ts 1.2 KB

1234567891011121314151617181920212223242526
  1. import type { Rule, RuleObject, RuleRender } from 'rc-field-form/lib/interface';
  2. import { FormProvider } from './context';
  3. import ErrorList from './ErrorList';
  4. import type { ErrorListProps } from './ErrorList';
  5. import InternalForm, { useForm, useWatch } from './Form';
  6. import type { FormInstance, FormProps } from './Form';
  7. import Item from './FormItem';
  8. import type { FormItemProps } from './FormItem';
  9. import List from './FormList';
  10. import type { FormListFieldData, FormListOperation, FormListProps } from './FormList';
  11. import useFormInstance from './hooks/useFormInstance';
  12. type InternalFormType = typeof InternalForm;
  13. type CompoundedComponent = InternalFormType & {
  14. useForm: typeof useForm;
  15. useFormInstance: typeof useFormInstance;
  16. useWatch: typeof useWatch;
  17. Item: typeof Item;
  18. List: typeof List;
  19. ErrorList: typeof ErrorList;
  20. Provider: typeof FormProvider;
  21. /** @deprecated Only for warning usage. Do not use. */
  22. create: () => void;
  23. };
  24. declare const Form: CompoundedComponent;
  25. export type { ErrorListProps, FormInstance, FormItemProps, FormListFieldData, FormListOperation, FormListProps, FormProps, Rule, RuleObject, RuleRender, };
  26. export default Form;