Skip to main content

NumberValueOptions

interface

Domain constraints for numberValue.

interface NumberValueOptions

Import

import { NumberValueOptions } from '@modular/sdk/editor';

Members4

clampoptional
boolean

Bring a value outside `min`/`max` to the nearest bound instead of rejecting it. Only a finite number is clamped: a value that is not a number at all, or is not an integer when `integer` is set, still falls back to the default, because there is no nearest bound for it. The distinction matters wherever the bound exists to cap work rather than to describe the domain. `ListItemNode`'s indent is capped because applying it nests one list per level, and an over-deep item read as the default `0` would be flattened, where clamping keeps it as deep as the cap allows.

integeroptional
boolean

Reject values that are not integers.

maxoptional
number

Reject values above this bound (inclusive); see NumberValueOptions.min.

minoptional
number

Reject values below this bound (inclusive). With `integer`, the bound is rounded up to the integer it admits — the same domain, stated so that `clamp` and anything reading the schema's `meta` see a member.