NumberConstraints
Runtime numeric constraints attached to a number flag/arg schema.
Bounds are inclusive. All fields are optional; an absent field means "no constraint" except for finite, which defaults to true (so Infinity / -Infinity are rejected unless opted back in).
- Import:
@kjanat/dreamcli - Export kind: interface
- Declared in:
src/core/schema/number-constraints.ts - Source link:
src/core/schema/number-constraints.ts:20
Signatures
ts
interface NumberConstraints {}Members
Properties
finite
Require a finite value. When true, Infinity / -Infinity are rejected.
ts
finite?: boolean;int
Require an integer value. Non-integers (e.g. 3.7) are rejected.
ts
int?: boolean;max
Inclusive upper bound. Values above this are rejected.
ts
max?: number;min
Inclusive lower bound. Values below this are rejected.
ts
min?: number;