kubb-labs/kubb

Duplicated InfiniteData for react-query v4 in infiniteQueries

Closed this issue · 1 comments

What version of kubb is running?

No response

What platform is your computer?

No response

What version of external packages are you using(@tanstack-query, MSW, React, Vue, ...)

No response

What steps can reproduce the bug?

  1. Open kubb example from site https://codesandbox.io/p/devbox/wispy-rgb-sgm8cw?embed=1
  2. Find file useFindPetsByStatusHook.ts
  3. Write on both of the file
type A = typeof useFindPetsByStatusHookInfinite<
  InfiniteData<FindPetsByStatus['response']>
>;

type B = ReturnType<A>;

type C = B['data'];

InfiniteData duplicates:
Снимок экрана 2024-10-05 в 02 19 43

How often does this bug happen?

Every time

What is the expected behavior?

InfiniteData not duplicates

Swagger/OpenAPI file?

In sandbox

Additional information

I think problem with UseInfiniteQueryResult and TData = InfiniteData<FindPetsByStatus['response']>. Using both duplicates InfiniteData
try without InfiniteData:

type A = typeof useFindPetsByStatusHookInfinite<FindPetsByStatus['response']>;

type B = ReturnType<A>;

type C = B['data'];

Working fine!
image

KUB-10

@RabbitShare This has been resolved as part of Kubb v2.28.1