8 lines
234 B
TypeScript
8 lines
234 B
TypeScript
import { Measurement, MeasurementMeta } from '@/models';
|
|
|
|
export function byTimestampComparator<T extends MeasurementMeta>(
|
|
a: Measurement<T>,
|
|
b: Measurement<T>): number {
|
|
return a.timestamp.getTime() - b.timestamp.getTime();
|
|
}
|