@@ -147,11 +147,13 @@ export type GetResultDescriptionFn<
147147 TagTypes extends string ,
148148 ResultType ,
149149 QueryArg ,
150- ErrorType
150+ ErrorType ,
151+ MetaType
151152> = (
152153 result : ResultType | undefined ,
153154 error : ErrorType | undefined ,
154- arg : QueryArg
155+ arg : QueryArg ,
156+ meta : MetaType
155157) => ReadonlyArray < TagDescription < TagTypes > >
156158
157159export type FullTagDescription < TagType > = {
@@ -163,10 +165,11 @@ export type ResultDescription<
163165 TagTypes extends string ,
164166 ResultType ,
165167 QueryArg ,
166- ErrorType
168+ ErrorType ,
169+ MetaType
167170> =
168171 | ReadonlyArray < TagDescription < TagTypes > >
169- | GetResultDescriptionFn < TagTypes , ResultType , QueryArg , ErrorType >
172+ | GetResultDescriptionFn < TagTypes , ResultType , QueryArg , ErrorType , MetaType >
170173
171174/** @deprecated please use `onQueryStarted` instead */
172175export interface QueryApi < ReducerPath extends string , Context extends { } > {
@@ -236,7 +239,8 @@ export interface QueryExtraOptions<
236239 TagTypes ,
237240 ResultType ,
238241 QueryArg ,
239- BaseQueryError < BaseQuery >
242+ BaseQueryError < BaseQuery > ,
243+ BaseQueryMeta < BaseQuery >
240244 >
241245 /**
242246 * Not to be used. A query should not invalidate tags in the cache.
@@ -310,7 +314,8 @@ export interface MutationExtraOptions<
310314 TagTypes ,
311315 ResultType ,
312316 QueryArg ,
313- BaseQueryError < BaseQuery >
317+ BaseQueryError < BaseQuery > ,
318+ BaseQueryMeta < BaseQuery >
314319 >
315320 /**
316321 * Not to be used. A mutation should not provide tags to the cache.
@@ -429,17 +434,23 @@ export type EndpointBuilder<
429434
430435export type AssertTagTypes = < T extends FullTagDescription < string > > ( t : T ) => T
431436
432- export function calculateProvidedBy < ResultType , QueryArg , ErrorType > (
437+ export function calculateProvidedBy < ResultType , QueryArg , ErrorType , MetaType > (
433438 description :
434- | ResultDescription < string , ResultType , QueryArg , ErrorType >
439+ | ResultDescription < string , ResultType , QueryArg , ErrorType , MetaType >
435440 | undefined ,
436441 result : ResultType | undefined ,
437442 error : ErrorType | undefined ,
438443 queryArg : QueryArg ,
444+ meta : MetaType | undefined ,
439445 assertTagTypes : AssertTagTypes
440446) : readonly FullTagDescription < string > [ ] {
441447 if ( isFunction ( description ) ) {
442- return description ( result as ResultType , error as undefined , queryArg )
448+ return description (
449+ result as ResultType ,
450+ error as undefined ,
451+ queryArg ,
452+ meta as MetaType
453+ )
443454 . map ( expandTagDescription )
444455 . map ( assertTagTypes )
445456 }
0 commit comments