Airblader commented on a change in pull request #17808:
URL: https://github.com/apache/flink/pull/17808#discussion_r750479169



##########
File path: 
flink-runtime-web/web-dashboard/src/app/pages/job/timeline/job-timeline.component.ts
##########
@@ -143,16 +189,18 @@ export class JobTimelineComponent implements 
AfterViewInit, OnDestroy {
     this.mainChartInstance.tooltip({
       title: 'name'
     });
-    this.mainChartInstance.on('click', (e: SafeAny) => {
+    this.mainChartInstance.on('click', (e: { x: number; y: number }) => {
       if (this.mainChartInstance.getSnapRecords(e).length) {
-        const data = (this.mainChartInstance.getSnapRecords(e)[0] as 
SafeAny)._origin;
+        const data = ((this.mainChartInstance.getSnapRecords(e)[0] as unknown) 
as {

Review comment:
       `… as number as { _origin: }` will not work, no. The whole reason `as 
unknown` is in here in the first place is because TS will not let you 
type-assert a known type into another one when there is no overlap and it could 
never work. It then recommends the only way around that, which is asserting it 
to `unknown` first.
   
   Really this is all rather "broken", obviously the types do not match what is 
going on here. But I haven't (yet) addressed that.




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


Reply via email to