The constraint values carried by a number type created with the constraints C: every key of NumberTypeConstraints, taking the value C gives it and undefined for the keys C leaves out.
C
undefined
import * as t from 'ts-fortress';const Age = t.number(0, { int: true, min: 0, max: 120 });const max: 120 = Age.constraints.max;const step: undefined = Age.constraints.step;assert.strictEqual(max, 120);assert.isUndefined(step); Copy
import * as t from 'ts-fortress';const Age = t.number(0, { int: true, min: 0, max: 120 });const max: 120 = Age.constraints.max;const step: undefined = Age.constraints.step;assert.strictEqual(max, 120);assert.isUndefined(step);
The constraint values carried by a number type created with the constraints
C: every key of NumberTypeConstraints, taking the valueCgives it andundefinedfor the keysCleaves out.