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