bito-code-review[bot] commented on PR #42126:
URL: https://github.com/apache/superset/pull/42126#issuecomment-4999294015

   <!-- Bito Reply -->
   The suggestion to replace `any` in the `tooltipContentGenerator` callback is 
valid, as using `any` bypasses TypeScript's type safety. To resolve this, you 
should define a specific interface or type for the hover information object 
consumed by the function. 
   
   Since the `tooltipContentGenerator` is used within `Contour.tsx` to process 
hover data, you can define a type that matches the structure of the object 
passed by deck.gl's `onHover` or similar event handlers. For example:
   
   ```typescript
   interface HoverInfo {
     object?: any;
     x: number;
     y: number;
     // Add other properties as needed based on deck.gl's PickingInfo
   }
   
   const tooltipContentGenerator = (o: HoverInfo) => {
     // ...
   }
   ```
   
   Would you like me to check the rest of the comments on this PR to see if 
there are other similar issues you would like to address?
   
   
**superset-frontend/plugins/preset-chart-deckgl/src/layers/Contour/Contour.tsx**
   ```
   interface HoverInfo {
     object?: any;
     x: number;
     y: number;
   }
   
   const tooltipContentGenerator = (o: HoverInfo) => {
     // ...
   }
   ```


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