swr
swr copied to clipboard
fix(types): export InfiniteKeyedMutator
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.
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.
Can we merge this?
any updates regarding this one? im unable to upgrade atm as im using KeyedMutator
as prop
I've changed the name to SWRInfiniteKeyedMutator
for consistency