Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(types): export InfiniteKeyedMutator #2900

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LeoMcA
Copy link

@LeoMcA LeoMcA commented Feb 21, 2024

https://github.com/vercel/swr/pull/2862/files added a new InfiniteKeyedMutator type, but didn't export it, which meant we had to use a rather roundabout fix:

// "swr/infinite" doesn't export InfiniteKeyedMutator directly
type InfiniteKeyedMutator<T> = SWRInfiniteResponse<
  T extends (infer I)[] ? I : T
>["mutate"];

It would be great if we could export this type directly, like KeyedMutator is.

Copy link

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.

@agjs
Copy link

agjs commented Mar 16, 2024

Can we merge this?

@eifr
Copy link

eifr commented Apr 18, 2024

any updates regarding this one? im unable to upgrade atm as im using KeyedMutator as prop

Copy link
Collaborator

@koba04 koba04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

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.

None yet

4 participants