ts-fortress
    Preparing search index...

    Type Alias WithConstraints<C>

    WithConstraints: Readonly<{ constraints: C }>

    The carrier of the constraint values a Type was created with.

    Constrained primitives (number, string, bigint and the branded types built on them) expose the constraints they were given as a plain, fully-enumerated record, so that the numbers a schema validates against can also drive a form (min / max / step on an <input>, a character counter, ...) instead of being written down a second time.

    Every key of the constraint set is present, so a constraint that was specified is read without ?.; one that was not is typed undefined.

    Type Parameters

    • C