jaredpalmer / formik

Build forms in React, without the tears 😭
https://formik.org
Apache License 2.0
33.77k stars 2.78k forks source link

feat(types): improved typescript support for ArrayHelpers #3788

Closed quantizor closed 1 year ago

quantizor commented 1 year ago

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.

Closes #3698 Fixes #3641

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
formik-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 26, 2023 7:34pm
codesandbox-ci[bot] commented 1 year ago

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 9194d3a09c42c143e35cef62d131d08266e8d0a9:

Sandbox Source
Formik TypeScript Playground Configuration
changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 9194d3a09c42c143e35cef62d131d08266e8d0a9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages | Name | Type | | ------------- | ----- | | formik | Minor | | formik-native | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR