@@ -16,10 +16,12 @@ import type {
1616} from './baseQueryTypes'
1717import type { CacheCollectionQueryExtraOptions } from './core/buildMiddleware/cacheCollection'
1818import type {
19+ CacheLifecycleInfiniteQueryExtraOptions ,
1920 CacheLifecycleMutationExtraOptions ,
2021 CacheLifecycleQueryExtraOptions ,
2122} from './core/buildMiddleware/cacheLifecycle'
2223import type {
24+ QueryLifecycleInfiniteQueryExtraOptions ,
2325 QueryLifecycleMutationExtraOptions ,
2426 QueryLifecycleQueryExtraOptions ,
2527} from './core/buildMiddleware/queryLifecycle'
@@ -265,13 +267,15 @@ type QueryTypes<
265267 * const useMyWrappedHook: UseQuery<typeof api.endpoints.query.Types.QueryDefinition> = ...
266268 * ```
267269 */
268- QueryDefinition : QueryDefinition <
269- QueryArg ,
270- BaseQuery ,
271- TagTypes ,
272- ResultType ,
273- ReducerPath
274- > | InfiniteQueryDefinition < QueryArg , BaseQuery , TagTypes , ResultType , ReducerPath >
270+ QueryDefinition :
271+ | QueryDefinition < QueryArg , BaseQuery , TagTypes , ResultType , ReducerPath >
272+ | InfiniteQueryDefinition <
273+ QueryArg ,
274+ BaseQuery ,
275+ TagTypes ,
276+ ResultType ,
277+ ReducerPath
278+ >
275279 TagTypes : TagTypes
276280 ReducerPath : ReducerPath
277281}
@@ -573,7 +577,19 @@ export interface InfiniteQueryExtraOptions<
573577 QueryArg ,
574578 BaseQuery extends BaseQueryFn ,
575579 ReducerPath extends string = string ,
576- > {
580+ > extends CacheLifecycleInfiniteQueryExtraOptions <
581+ ResultType ,
582+ QueryArg ,
583+ BaseQuery ,
584+ ReducerPath
585+ > ,
586+ QueryLifecycleInfiniteQueryExtraOptions <
587+ ResultType ,
588+ QueryArg ,
589+ BaseQuery ,
590+ ReducerPath
591+ > ,
592+ CacheCollectionQueryExtraOptions {
577593 type : DefinitionType . infinitequery
578594
579595 providesTags ?: never
@@ -959,14 +975,20 @@ export type OverrideResultType<Definition, NewResultType> =
959975 ReducerPath
960976 >
961977 : Definition extends InfiniteQueryDefinition <
962- infer QueryArg ,
963- infer BaseQuery ,
964- infer TagTypes ,
965- any ,
966- infer ReducerPath
967- >
968- ? InfiniteQueryDefinition < QueryArg , BaseQuery , TagTypes , NewResultType , ReducerPath >
969- : never
978+ infer QueryArg ,
979+ infer BaseQuery ,
980+ infer TagTypes ,
981+ any ,
982+ infer ReducerPath
983+ >
984+ ? InfiniteQueryDefinition <
985+ QueryArg ,
986+ BaseQuery ,
987+ TagTypes ,
988+ NewResultType ,
989+ ReducerPath
990+ >
991+ : never
970992
971993export type UpdateDefinitions <
972994 Definitions extends EndpointDefinitions ,
@@ -1002,18 +1024,18 @@ export type UpdateDefinitions<
10021024 ReducerPath
10031025 >
10041026 : Definitions [ K ] extends InfiniteQueryDefinition <
1005- infer QueryArg ,
1006- infer BaseQuery ,
1007- any ,
1008- infer ResultType ,
1009- infer ReducerPath
1010- >
1011- ? InfiniteQueryDefinition <
1012- QueryArg ,
1013- BaseQuery ,
1014- NewTagTypes ,
1015- TransformedResponse < NewDefinitions , K , ResultType > ,
1016- ReducerPath
1017- >
1027+ infer QueryArg ,
1028+ infer BaseQuery ,
1029+ any ,
1030+ infer ResultType ,
1031+ infer ReducerPath
1032+ >
1033+ ? InfiniteQueryDefinition <
1034+ QueryArg ,
1035+ BaseQuery ,
1036+ NewTagTypes ,
1037+ TransformedResponse < NewDefinitions , K , ResultType > ,
1038+ ReducerPath
1039+ >
10181040 : never
10191041}
0 commit comments