ts-type-forge
    Preparing search index...

    Type Alias PositiveInt32

    Branded numeric type for positive 32-bit signed integers. Range: [1, 2^31 - 1] or [1, 2,147,483,647]

    const isPositiveInt32 = (x: number): x is PositiveInt32 =>
    Number.isSafeInteger(x) && x > 0 && x <= 2**31 - 1;

    const userId = (id: PositiveInt32) => ({ userId: id });