@@ -237,10 +237,16 @@ export type EndpointDefinitionWithQueryFn<
237
237
rawErrorResponseSchema ?: never
238
238
}
239
239
240
- type BaseEndpointTypes < QueryArg , BaseQuery extends BaseQueryFn , ResultType > = {
240
+ type BaseEndpointTypes <
241
+ QueryArg ,
242
+ BaseQuery extends BaseQueryFn ,
243
+ ResultType ,
244
+ RawResultType ,
245
+ > = {
241
246
QueryArg : QueryArg
242
247
BaseQuery : BaseQuery
243
248
ResultType : ResultType
249
+ RawResultType : RawResultType
244
250
}
245
251
246
252
interface CommonEndpointDefinition <
@@ -519,7 +525,8 @@ type QueryTypes<
519
525
TagTypes extends string ,
520
526
ResultType ,
521
527
ReducerPath extends string = string ,
522
- > = BaseEndpointTypes < QueryArg , BaseQuery , ResultType > & {
528
+ RawResultType extends BaseQueryResult < BaseQuery > = BaseQueryResult < BaseQuery > ,
529
+ > = BaseEndpointTypes < QueryArg , BaseQuery , ResultType , RawResultType > & {
523
530
/**
524
531
* The endpoint definition type. To be used with some internal generic types.
525
532
* @example
@@ -547,6 +554,7 @@ export interface QueryExtraOptions<
547
554
QueryArg ,
548
555
BaseQuery extends BaseQueryFn ,
549
556
ReducerPath extends string = string ,
557
+ RawResultType extends BaseQueryResult < BaseQuery > = BaseQueryResult < BaseQuery > ,
550
558
> extends CacheLifecycleQueryExtraOptions <
551
559
ResultType ,
552
560
QueryArg ,
@@ -791,7 +799,14 @@ export interface QueryExtraOptions<
791
799
/**
792
800
* All of these are `undefined` at runtime, purely to be used in TypeScript declarations!
793
801
*/
794
- Types ?: QueryTypes < QueryArg , BaseQuery , TagTypes , ResultType , ReducerPath >
802
+ Types ?: QueryTypes <
803
+ QueryArg ,
804
+ BaseQuery ,
805
+ TagTypes ,
806
+ ResultType ,
807
+ ReducerPath ,
808
+ RawResultType
809
+ >
795
810
}
796
811
797
812
export type QueryDefinition <
@@ -802,7 +817,14 @@ export type QueryDefinition<
802
817
ReducerPath extends string = string ,
803
818
RawResultType extends BaseQueryResult < BaseQuery > = BaseQueryResult < BaseQuery > ,
804
819
> = BaseEndpointDefinition < QueryArg , BaseQuery , ResultType , RawResultType > &
805
- QueryExtraOptions < TagTypes , ResultType , QueryArg , BaseQuery , ReducerPath >
820
+ QueryExtraOptions <
821
+ TagTypes ,
822
+ ResultType ,
823
+ QueryArg ,
824
+ BaseQuery ,
825
+ ReducerPath ,
826
+ RawResultType
827
+ >
806
828
807
829
export type InfiniteQueryTypes <
808
830
QueryArg ,
@@ -811,7 +833,8 @@ export type InfiniteQueryTypes<
811
833
TagTypes extends string ,
812
834
ResultType ,
813
835
ReducerPath extends string = string ,
814
- > = BaseEndpointTypes < QueryArg , BaseQuery , ResultType > & {
836
+ RawResultType extends BaseQueryResult < BaseQuery > = BaseQueryResult < BaseQuery > ,
837
+ > = BaseEndpointTypes < QueryArg , BaseQuery , ResultType , RawResultType > & {
815
838
/**
816
839
* The endpoint definition type. To be used with some internal generic types.
817
840
* @example
@@ -838,6 +861,7 @@ export interface InfiniteQueryExtraOptions<
838
861
PageParam ,
839
862
BaseQuery extends BaseQueryFn ,
840
863
ReducerPath extends string = string ,
864
+ RawResultType extends BaseQueryResult < BaseQuery > = BaseQueryResult < BaseQuery > ,
841
865
> extends CacheLifecycleInfiniteQueryExtraOptions <
842
866
InfiniteData < ResultType , PageParam > ,
843
867
QueryArg ,
@@ -987,7 +1011,8 @@ export interface InfiniteQueryExtraOptions<
987
1011
BaseQuery ,
988
1012
TagTypes ,
989
1013
ResultType ,
990
- ReducerPath
1014
+ ReducerPath ,
1015
+ RawResultType
991
1016
>
992
1017
}
993
1018
@@ -1013,7 +1038,8 @@ export type InfiniteQueryDefinition<
1013
1038
QueryArg ,
1014
1039
PageParam ,
1015
1040
BaseQuery ,
1016
- ReducerPath
1041
+ ReducerPath ,
1042
+ RawResultType
1017
1043
>
1018
1044
1019
1045
type MutationTypes <
@@ -1022,7 +1048,8 @@ type MutationTypes<
1022
1048
TagTypes extends string ,
1023
1049
ResultType ,
1024
1050
ReducerPath extends string = string ,
1025
- > = BaseEndpointTypes < QueryArg , BaseQuery , ResultType > & {
1051
+ RawResultType extends BaseQueryResult < BaseQuery > = BaseQueryResult < BaseQuery > ,
1052
+ > = BaseEndpointTypes < QueryArg , BaseQuery , ResultType , RawResultType > & {
1026
1053
/**
1027
1054
* The endpoint definition type. To be used with some internal generic types.
1028
1055
* @example
@@ -1050,6 +1077,7 @@ export interface MutationExtraOptions<
1050
1077
QueryArg ,
1051
1078
BaseQuery extends BaseQueryFn ,
1052
1079
ReducerPath extends string = string ,
1080
+ RawResultType extends BaseQueryResult < BaseQuery > = BaseQueryResult < BaseQuery > ,
1053
1081
> extends CacheLifecycleMutationExtraOptions <
1054
1082
ResultType ,
1055
1083
QueryArg ,
@@ -1124,7 +1152,14 @@ export interface MutationExtraOptions<
1124
1152
/**
1125
1153
* All of these are `undefined` at runtime, purely to be used in TypeScript declarations!
1126
1154
*/
1127
- Types ?: MutationTypes < QueryArg , BaseQuery , TagTypes , ResultType , ReducerPath >
1155
+ Types ?: MutationTypes <
1156
+ QueryArg ,
1157
+ BaseQuery ,
1158
+ TagTypes ,
1159
+ ResultType ,
1160
+ ReducerPath ,
1161
+ RawResultType
1162
+ >
1128
1163
}
1129
1164
1130
1165
export type MutationDefinition <
@@ -1135,7 +1170,14 @@ export type MutationDefinition<
1135
1170
ReducerPath extends string = string ,
1136
1171
RawResultType extends BaseQueryResult < BaseQuery > = BaseQueryResult < BaseQuery > ,
1137
1172
> = BaseEndpointDefinition < QueryArg , BaseQuery , ResultType , RawResultType > &
1138
- MutationExtraOptions < TagTypes , ResultType , QueryArg , BaseQuery , ReducerPath >
1173
+ MutationExtraOptions <
1174
+ TagTypes ,
1175
+ ResultType ,
1176
+ QueryArg ,
1177
+ BaseQuery ,
1178
+ ReducerPath ,
1179
+ RawResultType
1180
+ >
1139
1181
1140
1182
export type EndpointDefinition <
1141
1183
QueryArg ,
0 commit comments