final-form / react-final-form

🏁 High performance subscription-based form state management for React
https://final-form.org/react
MIT License
7.38k stars 479 forks source link

FormApi restart is not exposed in types #840

Open jahglow opened 4 years ago

jahglow commented 4 years ago

Are you submitting a bug report or a feature request?

bug report

What is the current behavior?

What is the expected behavior?

FormApi type must include restart funciton definition

Sandbox Link

What's your environment?

react-final-form 6.5.1

Other information

nad182 commented 4 years ago

Facing the same issue:

Property 'restart' does not exist on type 'FormApi<Invitation, Partial<Invitation>>'.ts(2339)

I'm also using react-final-form@6.5.1

UPD: submitted a PR here to fix this.

johncblandii commented 4 years ago

Definitely could use this one.

VicAv99 commented 4 years ago

This would be helpful, any updates on this?

tj111 commented 3 years ago

This functionality would really be nice to have in typescript, having to work around to recreate a built-in feature is definitely not-ideal

erikras commented 3 years ago

Fix released in final-form@4.20.2.

davoam commented 2 years ago

Probably, this issue can be closed? Since, as mentioned in @erikras's comment after upgrading final-form to version 4.20.2 the problem has gone.