@cowwoc/requirements - v4.0.12
    Preparing search index...

    Interface NegativeNumberComponent

    Methods that validators for numbers that may be negative must contain.

    interface NegativeNumberComponent {
        isNegative(): this;
        isNotNegative(): this;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Ensures that the value is negative. -0.0 is considered to be zero and negative.

      Returns this

      this

      TypeError if the value is undefined or null

      RangeError if the value is:

      • not negative
      • not a number

    • Ensures that the value is not a negative number. -0.0 is considered to be zero and negative.

      Returns this

      this

      TypeError if the value is undefined or null

      RangeError if the value is a negative number