jansule commented on code in PR #25869:
URL: https://github.com/apache/superset/pull/25869#discussion_r1891553376


##########
superset-frontend/packages/superset-ui-core/src/chart/types/QueryResponse.ts:
##########
@@ -31,6 +31,14 @@ export interface TimeseriesDataRecord extends DataRecord {
   __timestamp: number | string | Date | null;
 }
 
+export const isTimeseriesDataRecord = (
+  item: any,
+): item is TimeseriesDataRecord => Object.keys(item).includes('__timestamp');
+
+export const isTimeseriesDataRecordList = (
+  items: any[],
+): items is TimeseriesDataRecord[] => items.every(isTimeseriesDataRecord);
+

Review Comment:
   Good catch. Removed it.



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