Skip to content
PACKAGES

latestMeasurementValue()

Read the latest successful measurement value for a target/kind pair.

import { latestMeasurementValue } from "@graphrefly/ts/solutions/reactive-layout";
function latestMeasurementValue(
measurements: Measurements,
targetId: string,
measurementKind: string,
): T | undefined
ParameterTypeDescription
measurementsMeasurementsMeasurement fact list to scan.
targetIdstringMeasurement target id.
measurementKindstringMeasurement kind tag.

The latest matching successful value, or undefined.

latestMeasurementValue(measurements, "title", "text-segments");

packages/ts/src/solutions/reactive-layout/measurements.ts