/** * @file wrap form with advanced features * @author chenqiang(chenqiang03) */ import * as React from 'react'; import { FormInstance as RcFormInstance } from 'rc-field-form'; import { ScrollOptions, NamePath, InternalNamePath } from '../interface'; export interface FormInstance extends RcFormInstance { scrollToField: (name: NamePath, options?: ScrollOptions) => void; /** @private Internal usage. Do not use in any production deployment. */ __INTERNAL__: { name?: string; itemRef: (name: InternalNamePath) => (node: React.ReactElement) => void; }; getFieldInstance: (name: NamePath) => any; } export default function useForm(form?: FormInstance): [FormInstance];