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