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


##########
superset-frontend/src/explore/controlUtils/standardizedFormData.ts:
##########
@@ -25,7 +25,6 @@ import {
   QueryFormMetric,
 } from '@superset-ui/core';
 import {
-  ControlStateMapping,
   getStandardizedControls,
   isStandardizedFormData,
   StandardizedControls,

Review Comment:
   This is **documenting existing technical debt**, not introducing a 
regression:
   
   1. `getControlsState()` in `store.ts` returns `Record<string, unknown>` (see 
line 59)
   2. The old return type claimed `controlsState: ControlStateMapping` where 
`ControlStateMapping = { [key: string]: ControlState }`
   3. `Record<string, unknown>` is **not compatible** with 
`ControlStateMapping` - this was an incorrect type annotation
   
   The original code had a type mismatch that only compiled because TypeScript 
wasn't being enforced strictly. The proper fix would require updating 
`getControlsState()` and multiple downstream functions to return proper types - 
that's out of scope for this JS→TS migration PR.
   
   The `eslint-disable` comments document this as technical debt for future 
cleanup.



-- 
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