ts-type-forge
    Preparing search index...

    Branded numeric type for safe unsigned integers. Represents non-negative integers within the safe integer range.

    const isSafeUint = (x: number): x is SafeUint =>
    Number.isSafeInteger(x) && x >= 0;

    const fileSize = (bytes: SafeUint) => ({ bytes });
    const timestamp = (): SafeUint => Date.now() as SafeUint;