The constraint values carried by a string type created with the constraints C: every key of StringTypeConstraints, taking the value C gives it and undefined for the keys C leaves out.
C
undefined
import * as t from 'ts-fortress';const Name = t.string('a', { minLength: 1, maxLength: 32 });const maxLength: 32 = Name.constraints.maxLength;const regex: undefined = Name.constraints.regex;assert.strictEqual(maxLength, 32);assert.isUndefined(regex); Copy
import * as t from 'ts-fortress';const Name = t.string('a', { minLength: 1, maxLength: 32 });const maxLength: 32 = Name.constraints.maxLength;const regex: undefined = Name.constraints.regex;assert.strictEqual(maxLength, 32);assert.isUndefined(regex);
The constraint values carried by a string type created with the constraints
C: every key of StringTypeConstraints, taking the valueCgives it andundefinedfor the keysCleaves out.