TinyBase logoTinyBase

MetricCallback

The MetricCallback type describes a function that takes a Metric's Id and a callback to loop over each Row within it.

(
  metricId: Id,
  metric?: Metric,
): void
TypeDescription
metricIdId

The Id of the Metric that the callback can operate on.

metric?Metric

The value of the Metric.

returnsvoid

This has no return value.

A MetricCallback is provided when using the forEachMetric method, so that you can do something based on every Metric in the Metrics object. See that method for specific examples.

A MetricCallback is provided when using the forEachMetric method, so that you can do something based on every Metric in the Metrics object. See that method for specific examples.