ts-type-forge
    Preparing search index...

    Type Alias Min<N>

    Min: MinImpl<N, []>

    Calculates the minimum value within a union of non-negative integer literals N (which must extend Uint10).

    Type Parameters

    • N extends Uint10

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

    The smallest integer literal present in the union N.

    type U = 2 | 5 | 1;
    type Result = Min<U>; // 1
    type ResultSingle = Min<5>; // 5
    type ResultZero = Min<0 | 10>; // 0