You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.
@tangjinzhou Just made a PR for this. It only apply to the useForm, as that is what I needed... Perhaps there are more places that are useful for generics.
What problem does this feature solve?
Currently some functions does not support generics so we cannot leverage the power of typescript on returning data.
Take for example this one --> https://2x.antdv.com/components/form/#components-form-demo-useform
I have an interface
I want to control the validation to return that type
So I am sure that the validate function just return the correct type.
What does the proposed API look like?
Looking in the generated type files I see
Where
validate
andvalidateField
are set toPromise<any>
instead of some thing likeThe text was updated successfully, but these errors were encountered: