@@ -12,7 +12,7 @@ import { focusManager } from './focusManager'
1212import { onlineManager } from './onlineManager'
1313import { notifyManager } from './notifyManager'
1414import { infiniteQueryBehavior } from './infiniteQueryBehavior'
15- import type { DataTag , NoInfer } from './types'
15+ import type { DataTag , NoInfer , OmitKeyof } from './types'
1616import type { QueryState } from './query'
1717import type {
1818 CancelOptions ,
@@ -43,7 +43,7 @@ import type { MutationFilters, QueryFilters, Updater } from './utils'
4343
4444interface QueryDefaults {
4545 queryKey : QueryKey
46- defaultOptions : Omit < QueryOptions < any , any , any > , 'queryKey' >
46+ defaultOptions : OmitKeyof < QueryOptions < any , any , any > , 'queryKey' >
4747}
4848
4949interface MutationDefaults {
@@ -429,7 +429,7 @@ export class QueryClient {
429429 setQueryDefaults (
430430 queryKey : QueryKey ,
431431 options : Partial <
432- Omit < QueryObserverOptions < unknown , any , any , any > , 'queryKey' >
432+ OmitKeyof < QueryObserverOptions < unknown , any , any , any > , 'queryKey' >
433433 > ,
434434 ) : void {
435435 this . #queryDefaults. set ( hashKey ( queryKey ) , {
@@ -440,10 +440,10 @@ export class QueryClient {
440440
441441 getQueryDefaults (
442442 queryKey : QueryKey ,
443- ) : Omit < QueryObserverOptions < any , any , any , any , any > , 'queryKey' > {
443+ ) : OmitKeyof < QueryObserverOptions < any , any , any , any , any > , 'queryKey' > {
444444 const defaults = [ ...this . #queryDefaults. values ( ) ]
445445
446- let result : Omit <
446+ let result : OmitKeyof <
447447 QueryObserverOptions < any , any , any , any , any > ,
448448 'queryKey'
449449 > = { }
@@ -458,7 +458,10 @@ export class QueryClient {
458458
459459 setMutationDefaults (
460460 mutationKey : MutationKey ,
461- options : Omit < MutationObserverOptions < any , any , any , any > , 'mutationKey' > ,
461+ options : OmitKeyof <
462+ MutationObserverOptions < any , any , any , any > ,
463+ 'mutationKey'
464+ > ,
462465 ) : void {
463466 this . #mutationDefaults. set ( hashKey ( mutationKey ) , {
464467 mutationKey,
0 commit comments