Skip to content

Commit

Permalink
fix(react-query): make queryFn optional again (#8176)
Browse files Browse the repository at this point in the history
* make queryFn optional again

* more fix
  • Loading branch information
juliusmarminge authored Oct 15, 2024
1 parent d409854 commit a085c92
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/react-query/src/infiniteQueryOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export type UnusedSkipTokenInfiniteOptions<
>,
'queryFn'
> & {
queryFn: Exclude<
queryFn?: Exclude<
UseInfiniteQueryOptions<
TQueryFnData,
TError,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-query/src/queryOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export type UnusedSkipTokenOptions<
UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,
'queryFn'
> & {
queryFn: Exclude<
queryFn?: Exclude<
UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'],
SkipToken
>
Expand Down
4 changes: 2 additions & 2 deletions packages/react-query/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface UseSuspenseQueryOptions<
UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,
'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'
> {
queryFn: Exclude<
queryFn?: Exclude<
UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>['queryFn'],
SkipToken
>
Expand Down Expand Up @@ -93,7 +93,7 @@ export interface UseSuspenseInfiniteQueryOptions<
>,
'queryFn' | 'enabled' | 'throwOnError' | 'placeholderData'
> {
queryFn: Exclude<
queryFn?: Exclude<
UseInfiniteQueryOptions<
TQueryFnData,
TError,
Expand Down

0 comments on commit a085c92

Please sign in to comment.