ts-fortress
    Preparing search index...

    Type Alias StringConstraintsOf<C>

    StringConstraintsOf: FillConstraints<Required<RawConstraints>, C>

    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.

    Type Parameters

    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);