diff --git a/packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx b/packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx index 78243a4f3f..fd8bd57917 100644 --- a/packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx +++ b/packages/react-query/src/__tests__/infiniteQueryOptions.test-d.tsx @@ -158,14 +158,12 @@ describe('infiniteQueryOptions', () => { const queryOptions = infiniteQueryOptions({ queryKey: ['example'], queryFn: async () => initialData, - // initialData below errors initialData: initialData ? () => ({ pages: [initialData], pageParams: [] }) : undefined, getNextPageParam: () => 1, initialPageParam: 1, }) - queryOptions.initialData expectTypeOf(queryOptions.initialData).toMatchTypeOf< | InitialDataFunction> | InfiniteData<{ example: boolean }, number> @@ -178,14 +176,12 @@ describe('infiniteQueryOptions', () => { const queryOptions = infiniteQueryOptions({ queryKey: ['example'], queryFn: async () => initialData, - // initialData below errors initialData: initialData ? { pages: [initialData], pageParams: [] } : undefined, getNextPageParam: () => 1, initialPageParam: 1, }) - queryOptions.initialData expectTypeOf(queryOptions.initialData).toMatchTypeOf< | InitialDataFunction> | InfiniteData<{ example: boolean }, number>