mirror of
https://github.com/grafana/grafana.git
synced 2025-08-01 16:15:38 +08:00

* Elasticsearch: remove usages of any * Elasticsearch: check for filter type when accessing field aggs * Elasticsearch: use type guards instead of checking types * Use unknown for isPrimitive function * Add deprecation notice * Remove unused type * Fix bug in "isPrimitive" function * Remove unused import * Revert "Fix bug in "isPrimitive" function" This reverts commit 27f9874ccebb582dd70ca0ed3e19219d9a19ad46.
9 lines
265 B
TypeScript
9 lines
265 B
TypeScript
import { ExtendedStats, MetricAggregation } from './dataquery.gen';
|
|
|
|
export function isMetricAggregationWithMeta(metric: MetricAggregation): metric is ExtendedStats {
|
|
if (!metric || typeof metric !== 'object') {
|
|
return false;
|
|
}
|
|
return 'meta' in metric;
|
|
}
|