You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/toolkit/src/query/endpointDefinitions.ts
+45-15Lines changed: 45 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -46,6 +46,7 @@ type EndpointDefinitionWithQuery<
46
46
QueryArg,
47
47
BaseQueryextendsBaseQueryFn,
48
48
ResultType,
49
+
RawResultTypeextendsBaseQueryResult<BaseQuery>,
49
50
>={
50
51
/**
51
52
* `query` can be a function that returns either a `string` or an `object` which is passed to your `baseQuery`. If you are using [fetchBaseQuery](./fetchBaseQuery), this can return either a `string` or an `object` of properties in `FetchArgs`. If you use your own custom [`baseQuery`](../../rtk-query/usage/customizing-queries), you can customize this behavior to your liking.
@@ -91,7 +92,7 @@ type EndpointDefinitionWithQuery<
91
92
* A function to manipulate the data returned by a query or mutation.
92
93
*/
93
94
transformResponse?(
94
-
baseQueryReturnValue: BaseQueryResult<BaseQuery>,
95
+
baseQueryReturnValue: RawResultType,
95
96
meta: BaseQueryMeta<BaseQuery>,
96
97
arg: QueryArg,
97
98
): ResultType|Promise<ResultType>
@@ -105,7 +106,7 @@ type EndpointDefinitionWithQuery<
105
106
): unknown
106
107
107
108
/** A schema for the result *before* it's passed to `transformResponse` */
0 commit comments