GraphReFlyTS

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

ParameterTypeDescription
valueunknownUnknown value to check or decode.
labelunknownlabel value used by the helper.

Returns

The narrowed, validated value.

Example

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

Source

packages/ts/src/storage/scalar.ts