Skip to content

fix: standalone utility return types; docs#4072

Open
manbearwiz wants to merge 1 commit into
jaredpalmer:mainfrom
manbearwiz:fix/field-array-utility-types
Open

fix: standalone utility return types; docs#4072
manbearwiz wants to merge 1 commit into
jaredpalmer:mainfrom
manbearwiz:fix/field-array-utility-types

Conversation

@manbearwiz

@manbearwiz manbearwiz commented May 14, 2026

Copy link
Copy Markdown

The standalone exported utility functions (move, swap, insert, replace) were losing generic type information because copyArrayLike was typed as (ArrayLike<any>) => any[].

  • Make copyArrayLike generic so callers correctly infer T[] image
  • Add explicit T[] return type annotations to all four exports for TS performance
  • Document each export (previously, move showed "Some array helpers!") image

@changeset-bot

changeset-bot Bot commented May 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e023f40

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

This PR includes changesets to release 2 packages
Name Type
formik Patch
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

@vercel

vercel Bot commented May 14, 2026

Copy link
Copy Markdown

@kevinbrey is attempting to deploy a commit to the Formik Team on Vercel.

A member of the Team first needs to authorize it.

@codesandbox-ci

codesandbox-ci Bot commented May 14, 2026

Copy link
Copy Markdown

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.

@manbearwiz manbearwiz force-pushed the fix/field-array-utility-types branch from c411472 to e023f40 Compare May 14, 2026 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants