import { last } from 'lodash' ; import type { Series , Metric } from '../../../../common/types' ; export const getLastMetric = ( series ) => last ( series . metrics . filter ( ( s ) => s . type !== 'series_agg' ) ) as Metric ;