bito-code-review[bot] commented on code in PR #44559:
URL: https://github.com/apache/superset/pull/44559#discussion_r4079747490


##########
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/sharedControls.tsx:
##########
@@ -519,4 +519,10 @@ const sharedControls: Record<string, 
SharedControlConfig<any>> = {
   ...matrixifyControls,
 };
 
+type RegisteredControl = (typeof controlConfigs)[keyof typeof controlConfigs];
+
+// Each control retains the option type accepted by its renderer.
+const sharedControls: typeof controlConfigs &
+  Record<string, RegisteredControl> = controlConfigs;

Review Comment:
   <!-- Bito Reply -->
   The suggestion provided by the reviewer was correct in identifying that the 
type alias and intersection were redundant, as the spread already provides the 
necessary index signature. Applying this suggestion improves the code by 
removing unnecessary type-level complexity while maintaining the desired type 
safety. You should proceed with the change as it simplifies the implementation 
without losing functionality.



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