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


##########
superset-frontend/plugins/legacy-plugin-chart-calendar/src/Calendar.ts:
##########
@@ -96,12 +98,13 @@ function Calendar(element, props) {
     }
     const timestamps = metricsData[metric];
     const extents = d3Extent(Object.keys(timestamps), key => timestamps[key]);
-    const step = (extents[1] - extents[0]) / (steps - 1);
+    const step =

Review Comment:
   This is a direct TypeScript migration of existing legacy plugin code. The 
suggestion identifies a pre-existing edge case that should be addressed in a 
separate bug fix PR, not in a migration PR.



##########
superset-frontend/plugins/legacy-plugin-chart-country-map/src/CountryMap.ts:
##########
@@ -60,17 +73,17 @@ function CountryMap(element, props) {
   const container = element;
   const format = getNumberFormatter(numberFormat);
   const linearColorScale = getSequentialSchemeRegistry()
-    .get(linearColorScheme)
-    .createLinearScale(d3Extent(data, v => v.metric));
+    .get(linearColorScheme)!
+    .createLinearScale(d3Extent(data, v => v.metric) as [number, number]);

Review Comment:
   This is a direct TypeScript migration of existing legacy plugin code. The 
suggestion identifies a pre-existing edge case that should be addressed in a 
separate bug fix PR, not in a migration PR.



##########
superset-frontend/plugins/legacy-plugin-chart-country-map/src/CountryMap.ts:
##########
@@ -213,8 +228,8 @@ function CountryMap(element, props) {
   if (map) {
     drawMap(map);
   } else {
-    const url = countries[country];
-    d3.json(url, (error, mapData) => {
+    const url = (countries as Record<string, string>)[country];
+    d3.json(url, (error: unknown, mapData: GeoData) => {
       if (error) {

Review Comment:
   This is a direct TypeScript migration of existing legacy plugin code. The 
suggestion identifies a pre-existing edge case that should be addressed in a 
separate bug fix PR, not in a migration PR.



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