ts-type-forge
    Preparing search index...

    Type Alias Min<N>

    Min: IsNever<N> extends true ? never : MinCoarse<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;

    expectType<Min<U>, 1>('=');

    expectType<Min<5>, 5>('=');

    expectType<Min<0 | 10>, 0>('=');

    expectType<Min<1000 | 1023>, 1000>('=');