Skip to content
PACKAGES

assertNonNegativeDecimalIntegerString()

Assert a canonical non-negative decimal integer string and return it typed.

import { assertNonNegativeDecimalIntegerString } from "@graphrefly/ts/storage";
function assertNonNegativeDecimalIntegerString(
value: unknown,
label = "decimal integer",
): NonNegativeDecimalIntegerString
ParameterTypeDescription
valueunknownUnknown value to check or decode.
labelunknownlabel value used by the helper.

The narrowed, validated value.

import { assertNonNegativeDecimalIntegerString } from "@graphrefly/ts/storage";

packages/ts/src/storage/scalar.ts