ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
92.55k stars 49.84k forks source link

Even if I passed a type to useform, form.validateFields Always return Store type #27298

Open Mamba-working opened 4 years ago

Mamba-working commented 4 years ago

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Even if I passed a type to useform, form.validateFields Always return Store type

What is expected?

const [form] = useForm() form.validateFields.then(res => { const values = res; // values is IForm })

What is actually happening?

Type is Store

Environment Info
antd 4.7.1
React 16.13.1
System mac os Catalina 10.15.7
Browser IE Edge 86.0.622.48
zhuyunhe commented 3 years ago

4.6.1 still has this issue