validMeasurementSize()
Validate a size record for measurement output.
Import
Section titled “Import”import { validMeasurementSize } from "@graphrefly/ts/solutions/reactive-layout";Signature
Section titled “Signature”function validMeasurementSize( size: Size, label: string,): SizeParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
size | Size | Size to validate. |
label | string | Label used in the error message. |
Returns
Section titled “Returns”The validated size.
Example
Section titled “Example”validMeasurementSize({ width: 10, height: 20 }, "image");Source
Section titled “Source”packages/ts/src/solutions/reactive-layout/measurements.ts