@@ -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'
@@ -261,13 +263,15 @@ type QueryTypes<
261263 * const useMyWrappedHook: UseQuery<typeof api.endpoints.query.Types.QueryDefinition> = ...
262264 * ```
263265 */
264- QueryDefinition : QueryDefinition <
265- QueryArg ,
266- BaseQuery ,
267- TagTypes ,
268- ResultType ,
269- ReducerPath
270- > | InfiniteQueryDefinition < QueryArg , BaseQuery , TagTypes , ResultType , ReducerPath >
266+ QueryDefinition :
267+ | QueryDefinition < QueryArg , BaseQuery , TagTypes , ResultType , ReducerPath >
268+ | InfiniteQueryDefinition <
269+ QueryArg ,
270+ BaseQuery ,
271+ TagTypes ,
272+ ResultType ,
273+ ReducerPath
274+ >
271275 TagTypes : TagTypes
272276 ReducerPath : ReducerPath
273277}
@@ -569,7 +573,19 @@ export interface InfiniteQueryExtraOptions<
569573 QueryArg ,
570574 BaseQuery extends BaseQueryFn ,
571575 ReducerPath extends string = string ,
572- > {
576+ > extends CacheLifecycleInfiniteQueryExtraOptions <
577+ ResultType ,
578+ QueryArg ,
579+ BaseQuery ,
580+ ReducerPath
581+ > ,
582+ QueryLifecycleInfiniteQueryExtraOptions <
583+ ResultType ,
584+ QueryArg ,
585+ BaseQuery ,
586+ ReducerPath
587+ > ,
588+ CacheCollectionQueryExtraOptions {
573589 type : DefinitionType . infinitequery
574590
575591 providesTags ?: never
@@ -955,14 +971,20 @@ export type OverrideResultType<Definition, NewResultType> =
955971 ReducerPath
956972 >
957973 : Definition extends InfiniteQueryDefinition <
958- infer QueryArg ,
959- infer BaseQuery ,
960- infer TagTypes ,
961- any ,
962- infer ReducerPath
963- >
964- ? InfiniteQueryDefinition < QueryArg , BaseQuery , TagTypes , NewResultType , ReducerPath >
965- : never
974+ infer QueryArg ,
975+ infer BaseQuery ,
976+ infer TagTypes ,
977+ any ,
978+ infer ReducerPath
979+ >
980+ ? InfiniteQueryDefinition <
981+ QueryArg ,
982+ BaseQuery ,
983+ TagTypes ,
984+ NewResultType ,
985+ ReducerPath
986+ >
987+ : never
966988
967989export type UpdateDefinitions <
968990 Definitions extends EndpointDefinitions ,
@@ -998,18 +1020,18 @@ export type UpdateDefinitions<
9981020 ReducerPath
9991021 >
10001022 : Definitions [ K ] extends InfiniteQueryDefinition <
1001- infer QueryArg ,
1002- infer BaseQuery ,
1003- any ,
1004- infer ResultType ,
1005- infer ReducerPath
1006- >
1007- ? InfiniteQueryDefinition <
1008- QueryArg ,
1009- BaseQuery ,
1010- NewTagTypes ,
1011- TransformedResponse < NewDefinitions , K , ResultType > ,
1012- ReducerPath
1013- >
1023+ infer QueryArg ,
1024+ infer BaseQuery ,
1025+ any ,
1026+ infer ResultType ,
1027+ infer ReducerPath
1028+ >
1029+ ? InfiniteQueryDefinition <
1030+ QueryArg ,
1031+ BaseQuery ,
1032+ NewTagTypes ,
1033+ TransformedResponse < NewDefinitions , K , ResultType > ,
1034+ ReducerPath
1035+ >
10141036 : never
10151037}
0 commit comments