Skip to content

Commit 3d8b771

Browse files
committed
Work around lifecycle types errors
1 parent 15b6335 commit 3d8b771

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/toolkit/src/query/core/buildMiddleware/cacheLifecycle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export const buildCacheLifecycleHandler: InternalHandlerBuilder = ({
355355
cacheEntryRemoved,
356356
}
357357

358-
const runningHandler = onCacheEntryAdded(originalArgs, lifecycleApi)
358+
const runningHandler = onCacheEntryAdded(originalArgs, lifecycleApi as any)
359359
// if a `neverResolvedError` was thrown, but not handled in the running handler, do not let it leak out further
360360
Promise.resolve(runningHandler).catch((e) => {
361361
if (e === neverResolvedError) return

packages/toolkit/src/query/core/buildMiddleware/queryLifecycle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,7 +483,7 @@ export const buildQueryLifecycleHandler: InternalHandlerBuilder = ({
483483
: undefined) as any,
484484
queryFulfilled,
485485
}
486-
onQueryStarted(originalArgs, lifecycleApi)
486+
onQueryStarted(originalArgs, lifecycleApi as any)
487487
}
488488
} else if (isFullfilledThunk(action)) {
489489
const { requestId, baseQueryMeta } = action.meta

0 commit comments

Comments
 (0)