mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 09:33:34 -06: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 27f9874cce
.
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;
|
|
}
|