ts-fortress
    Preparing search index...

    Type Alias UintRangeInclusive<MinValue, MaxValue>

    UintRangeInclusive: RelaxedExclude<IndexInclusive<MaxValue>, Index<MinValue>>

    Creates a union of non-negative integer literals starting from MinValue (inclusive) up to MaxValue (inclusive).

    Both bounds are limited to the unsigned 11-bit range (Uint11, 0 to 2047); an inclusive upper bound never needs the extra 2048 that UintRange's exclusive End accepts. Ranges where MinValue > MaxValue resolve to never.

    For a 0-based range beyond that cap — such as the 0 | ... | 2048 union behind SupportedLength, whose inclusive 2048 is one past Uint11 — use IndexInclusive directly: UintRangeInclusive<0, N> and IndexInclusive<N> are the same type.

    Type Parameters

    • MinValue extends Uint11

      The starting integer literal (inclusive).

    • MaxValue extends Uint11

      The ending integer literal (inclusive).

    A union type MinValue | MinValue + 1 | ... | MaxValue.

    type RI1 = UintRangeInclusive<3, 7>; // 3 | 4 | 5 | 6 | 7
    type RI2 = UintRangeInclusive<0, 4>; // 0 | 1 | 2 | 3 | 4
    type RI3 = UintRangeInclusive<5, 5>; // 5