-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(types): improved typescript support for ArrayHelpers (#3788)
* improved typescript support for ArrayHelpers * change default type to unknown[] Co-authored-by: Alperen Turkoz <[email protected]> * chore: add changeset --------- Co-authored-by: Alexander Magana <[email protected]> Co-authored-by: Alperen Turkoz <[email protected]> Co-authored-by: Jared Palmer <[email protected]>
- Loading branch information
1 parent
39a7bf7
commit 73de78d
Showing
2 changed files
with
23 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'formik': minor | ||
--- | ||
|
||
Added typescript generics to `ArrayHelpers` interface and its methods so that users who use TypeScript can set the type for their arrays and have type safety on array utils. I have also gone ahead and made supplying a type for the generic optional for the sake of backwards compatibility so any existing TS code that does not give a type for the FieldArray will continue to work as they always have. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73de78d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
formik-docs – ./website
formik-docs-git-master-jared.vercel.app
formik-docs.vercel.app
formik-docs-jared.vercel.app
www.formik.org
formik.org