assertNonNegativeDecimalIntegerString()
Assert a canonical non-negative decimal integer string and return it typed.
Import
Section titled “Import”import { assertNonNegativeDecimalIntegerString } from "@graphrefly/ts/storage";Signature
Section titled “Signature”function assertNonNegativeDecimalIntegerString( value: unknown, label = "decimal integer",): NonNegativeDecimalIntegerStringParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | Unknown value to check or decode. |
label | unknown | label value used by the helper. |
Returns
Section titled “Returns”The narrowed, validated value.
Example
Section titled “Example”import { assertNonNegativeDecimalIntegerString } from "@graphrefly/ts/storage";Source
Section titled “Source”packages/ts/src/storage/scalar.ts