Branded numeric type for negative integers. Represents integers strictly less than zero.
const isNegativeInt = (x: number): x is NegativeInt => Number.isInteger(x) && x < 0;const offset = (value: NegativeInt) => ({ offset: value });const depth = (level: NegativeInt) => ({ belowGround: Math.abs(level) }); Copy
const isNegativeInt = (x: number): x is NegativeInt => Number.isInteger(x) && x < 0;const offset = (value: NegativeInt) => ({ offset: value });const depth = (level: NegativeInt) => ({ belowGround: Math.abs(level) });
Branded numeric type for negative integers. Represents integers strictly less than zero.