rusackas commented on code in PR #37625:
URL: https://github.com/apache/superset/pull/37625#discussion_r2759081077
##########
superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/transformProps.ts:
##########
@@ -217,7 +217,7 @@ export default function transformProps(
if (data.length > 0) {
const reversedData = [...sortedData].reverse();
- // @ts-ignore
+ // @ts-expect-error
Review Comment:
Acknowledged. The root issue is that `sortedData` is typed as `[number |
null, number | null][]` but `TimeSeriesDatum` expects `[number, number |
null][]`.
Changing the `TimeSeriesDatum` type to allow null timestamps would require
auditing all usages of that type across the codebase to ensure they handle null
timestamps correctly - it's a broader type safety consideration that should be
done in a separate, focused PR.
Added an explanatory comment to the `@ts-expect-error` explaining the type
mismatch and noting that null timestamps are handled at runtime (lines 250,
254).
--
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]