diff --git a/packages/react-query/src/infiniteQueryOptions.ts b/packages/react-query/src/infiniteQueryOptions.ts index e013c1f8d3..097008726d 100644 --- a/packages/react-query/src/infiniteQueryOptions.ts +++ b/packages/react-query/src/infiniteQueryOptions.ts @@ -48,7 +48,7 @@ export type UnusedSkipTokenInfiniteOptions< >, 'queryFn' > & { - queryFn: Exclude< + queryFn?: Exclude< UseInfiniteQueryOptions< TQueryFnData, TError, diff --git a/packages/react-query/src/queryOptions.ts b/packages/react-query/src/queryOptions.ts index a763ab2289..4daaf36a80 100644 --- a/packages/react-query/src/queryOptions.ts +++ b/packages/react-query/src/queryOptions.ts @@ -29,7 +29,7 @@ export type UnusedSkipTokenOptions< UseQueryOptions, 'queryFn' > & { - queryFn: Exclude< + queryFn?: Exclude< UseQueryOptions['queryFn'], SkipToken > diff --git a/packages/react-query/src/types.ts b/packages/react-query/src/types.ts index 45da8a6a93..8516536361 100644 --- a/packages/react-query/src/types.ts +++ b/packages/react-query/src/types.ts @@ -50,7 +50,7 @@ export interface UseSuspenseQueryOptions< UseQueryOptions, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData' > { - queryFn: Exclude< + queryFn?: Exclude< UseQueryOptions['queryFn'], SkipToken > @@ -93,7 +93,7 @@ export interface UseSuspenseInfiniteQueryOptions< >, 'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData' > { - queryFn: Exclude< + queryFn?: Exclude< UseInfiniteQueryOptions< TQueryFnData, TError,