ts-type-forge
    Preparing search index...

    Type Alias Max<N>

    Max: MaxImpl<N, []>

    Calculates the smallest integer M such that all numbers in the union N (which must extend Uint10) are less than M. Effectively, this calculates max(N).

    Type Parameters

    • N extends Uint10

      A union of non-negative integer literals up to 1023 (Uint10).

    The smallest integer literal greater than all numbers in N.

    type U2 = 0 | 1 | 2;
    type Result = Max<U2>; // 2
    type ResultSingle = Max<5>; // 5
    // type ResultFull = Max<Uint10>; // 1023