GraphReFlyTS

API Reference

assertDecimalIntegerString()

Assert a canonical decimal integer string and return it typed.

Import

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

Signature

function assertDecimalIntegerString(
	value: unknown,
	label = "decimal integer",
): DecimalIntegerString

Parameters

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

Returns

The narrowed, validated value.

Example

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

Source

packages/ts/src/storage/scalar.ts