ts-type-forge
    Preparing search index...

    Branded numeric type for non-positive integers. Represents integers less than or equal to zero.

    const isNonPositiveInt = (x: number): x is NonPositiveInt =>
    Number.isInteger(x) && x <= 0;

    const countdown = (remaining: NonPositiveInt) => ({ remaining });
    const penalty = (points: NonPositiveInt) => ({ penalty: points });