@@ -305,14 +305,6 @@ export type InfiniteQueryFunction<
305305
306306export interface BaseSharedOptions {
307307 suspense : boolean
308- queryKeySerializerFn ?: (
309- queryKey :
310- | QueryKeyPart [ ]
311- | string
312- | false
313- | undefined
314- | ( ( ) => QueryKeyPart [ ] | string | false | undefined )
315- ) => [ string , QueryKeyPart [ ] ] | [ ]
316308}
317309
318310export interface BaseQueryOptions < TError = Error > {
@@ -357,7 +349,8 @@ export interface PrefetchQueryOptions<TResult, TError = Error>
357349 throwOnError ?: boolean
358350}
359351
360- export interface SetQueryDataQueryOptions < TResult , TError = Error > extends QueryOptions < TResult , TError > {
352+ export interface SetQueryDataQueryOptions < TResult , TError = Error >
353+ extends QueryOptions < TResult , TError > {
361354 exact ?: boolean
362355}
363356
@@ -475,7 +468,7 @@ export function useMutation<TResults, TVariables = undefined, TError = Error>(
475468
476469export type MutationFunction < TResults , TVariables , TError = Error > = (
477470 variables : TVariables ,
478- mutateOptions ?: MutateOptions < TResults , TVariables , TError > ,
471+ mutateOptions ?: MutateOptions < TResults , TVariables , TError >
479472) => Promise < TResults >
480473
481474export interface MutateOptions < TResult , TVariables , TError = Error > {
@@ -504,7 +497,10 @@ export type MutateFunction<
504497 TError = Error
505498> = undefined extends TVariables
506499 ? ( options ?: MutateOptions < TResult , TVariables , TError > ) => Promise < TResult >
507- : ( variables : TVariables , options ?: MutateOptions < TResult , TVariables , TError > ) => Promise < TResult >
500+ : (
501+ variables : TVariables ,
502+ options ?: MutateOptions < TResult , TVariables , TError >
503+ ) => Promise < TResult >
508504
509505export interface MutationResultBase < TResult , TError = Error > {
510506 status : 'idle' | 'loading' | 'error' | 'success'
@@ -637,7 +633,10 @@ export interface QueryCache {
637633 getQueryData < T = unknown > ( key : AnyQueryKey | string ) : T | undefined
638634 setQueryData < TResult , TError > (
639635 key : AnyQueryKey | string ,
640- dataOrUpdater : TResult | undefined | ( ( oldData : TResult | undefined ) => TResult | undefined ) ,
636+ dataOrUpdater :
637+ | TResult
638+ | undefined
639+ | ( ( oldData : TResult | undefined ) => TResult | undefined ) ,
641640 config ?: SetQueryDataQueryOptions < TResult , TError >
642641 ) : void
643642 invalidateQueries < TResult > (
@@ -712,6 +711,14 @@ export interface ReactQueryProviderConfig<TError = Error> {
712711 /** Defaults to the value of `suspense` if not defined otherwise */
713712 useErrorBoundary ?: boolean
714713 refetchOnWindowFocus ?: boolean
714+ queryKeySerializerFn ?: (
715+ queryKey :
716+ | QueryKeyPart [ ]
717+ | string
718+ | false
719+ | undefined
720+ | ( ( ) => QueryKeyPart [ ] | string | false | undefined )
721+ ) => [ string , QueryKeyPart [ ] ] | [ ]
715722 }
716723 shared ?: BaseSharedOptions
717724 mutations ?: {
0 commit comments