API Reference
latestMeasurementValue()
Read the latest successful measurement value for a target/kind pair.
Import
import { latestMeasurementValue } from "@graphrefly/ts/solutions/reactive-layout";
Signature
function latestMeasurementValue(
measurements: Measurements,
targetId: string,
measurementKind: string,
): T | undefined
Parameters
| Parameter | Type | Description |
|---|---|---|
measurements | Measurements | Measurement fact list to scan. |
targetId | string | Measurement target id. |
measurementKind | string | Measurement kind tag. |
Returns
The latest matching successful value, or undefined.
Example
latestMeasurementValue(measurements, "title", "text-segments");
Source
packages/ts/src/solutions/reactive-layout/measurements.ts