rusackas commented on code in PR #37625:
URL: https://github.com/apache/superset/pull/37625#discussion_r2771383418


##########
superset-frontend/src/dashboard/reducers/dashboardState.test.ts:
##########
@@ -117,10 +137,10 @@ describe('DashboardState reducer', () => {
         }),
       );
       request = setActiveTab('TAB-2', 'TAB-1');
-      thunkAction = request(store.dispatch, () => ({
+      thunkAction = request(store.dispatch, (() => ({
         ...(store.getState() as object),
-        dashboardState: result,
-      }));
+        dashboardState: result as DashboardState,
+      })) as any);
       result = typedDashboardStateReducer(result, thunkAction);

Review Comment:
   Addressed in bbd1dc38bc. Changed all `store.getState as any` to 
`store.getState as () => RootState` with proper type imports.



##########
superset-frontend/src/explore/actions/exploreActions.test.ts:
##########
@@ -199,8 +199,8 @@ describe('reducers', () => {
     ];
 
     const newState = exploreReducer(
-      mockedState,
-      actions.setControlValue('metrics', updatedMetrics, []),
+      mockedState as any,
+      actions.setControlValue('metrics', updatedMetrics, []) as any,

Review Comment:
   Addressed in bbd1dc38bc. Changed all `as any` casts to more specific types:
   - State casts: `as unknown as ExploreState` (for partial mocks that don't 
construct full state)
   - Action casts: `as AnyAction` (proper redux type)
   
   Added proper imports for `AnyAction` from redux and `ExploreState` from the 
reducer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to