From 188db5419b6137b20d1b3ae78508d8fcdae50ae5 Mon Sep 17 00:00:00 2001 From: Nathan Bierema Date: Mon, 25 Dec 2023 00:28:25 -0500 Subject: [PATCH] Fix rtk-query-monitor build --- .../src/containers/RtkQueryInspector.tsx | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/packages/redux-devtools-rtk-query-monitor/src/containers/RtkQueryInspector.tsx b/packages/redux-devtools-rtk-query-monitor/src/containers/RtkQueryInspector.tsx index e7634e30eb..da231addd5 100644 --- a/packages/redux-devtools-rtk-query-monitor/src/containers/RtkQueryInspector.tsx +++ b/packages/redux-devtools-rtk-query-monitor/src/containers/RtkQueryInspector.tsx @@ -1,5 +1,5 @@ import React, { PureComponent, createRef, ReactNode } from 'react'; -import type { AnyAction, Dispatch, Action } from '@reduxjs/toolkit'; +import type { Dispatch, Action } from '@reduxjs/toolkit'; import type { LiftedAction, LiftedState } from '@redux-devtools/core'; import { QueryFormValues, @@ -96,15 +96,33 @@ class RtkQueryInspector> extends PureComponent< } handleQueryFormValuesChange = (values: Partial): void => { - this.props.dispatch(changeQueryFormValues(values) as AnyAction); + this.props.dispatch( + changeQueryFormValues(values) as unknown as LiftedAction< + S, + A, + RtkQueryMonitorState + >, + ); }; handleSelectQuery = (queryInfo: RtkResourceInfo): void => { - this.props.dispatch(selectQueryKey(queryInfo) as AnyAction); + this.props.dispatch( + selectQueryKey(queryInfo) as unknown as LiftedAction< + S, + A, + RtkQueryMonitorState + >, + ); }; handleTabChange = (tab: QueryPreviewTabs): void => { - this.props.dispatch(selectedPreviewTab(tab) as AnyAction); + this.props.dispatch( + selectedPreviewTab(tab) as unknown as LiftedAction< + S, + A, + RtkQueryMonitorState + >, + ); }; render(): ReactNode {