hainenber commented on code in PR #31979:
URL: https://github.com/apache/superset/pull/31979#discussion_r1932563873


##########
superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberPeriodOverPeriod/utils.ts:
##########
@@ -35,10 +35,13 @@ const getFontSizeMapping = (
   proportionValues: number[],
   actualSizes: number[],
 ) =>
-  proportionValues.reduce((acc, value, index) => {
-    acc[value] = actualSizes[index] ?? actualSizes[actualSizes.length - 1];
-    return acc;
-  }, {});
+  proportionValues.reduce(
+    (acc, value, index) => {
+      acc[value] = actualSizes[index] ?? actualSizes[actualSizes.length - 1];
+      return acc;
+    },
+    {} as Record<number, number>,
+  );

Review Comment:
   I wonder which one would help further with readability? Personally I 
wouldn't want the type to be cluttered with functions et cetera but I don't 
mind if it's an established convention in the codebase



-- 
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: notifications-unsubscr...@superset.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org
For additional commands, e-mail: notifications-h...@superset.apache.org

Reply via email to