Type Alias IsNegative<N>

IsNegative<N>: N extends unknown
    ? IfExtends<`${N}`, `-${number}`>
    : never

Checks if a number includes the negative sign.

Type Parameters

  • N extends number